diff options
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index 8baf2fa2edd..cc2932ef899 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -1817,7 +1817,7 @@ class Binary(Field): return None # Detect if the binary content is an SVG for restricting its upload # only to system users. - if value[:1] == b'P': # Fast detection of first 6 bits of '<' (0x3C) + if value[:1] in (b'P', 'P'): # Fast detection of first 6 bits of '<' (0x3C) decoded_value = base64.b64decode(value) # Full mimetype detection if (guess_mimetype(decoded_value).startswith('image/svg') and |
