diff --git a/muk_fields_lobject/__manifest__.py b/muk_fields_lobject/__manifest__.py index 41e3574..e5bd778 100644 --- a/muk_fields_lobject/__manifest__.py +++ b/muk_fields_lobject/__manifest__.py @@ -20,7 +20,7 @@ { "name": "MuK Large Objects", "summary": """PGSQL Large Objects Support""", - "version": '12.0.2.2.4', + "version": '12.0.2.2.5', "category": 'Extra Tools', "license": "AGPL-3", "website": "https://www.mukit.at", diff --git a/muk_fields_lobject/fields/lobject.py b/muk_fields_lobject/fields/lobject.py index ddc3748..99aa52f 100644 --- a/muk_fields_lobject/fields/lobject.py +++ b/muk_fields_lobject/fields/lobject.py @@ -45,15 +45,9 @@ class LargeObject(fields.Field): return None lobject = record.env.cr._cnx.lobject(0, 'wb') if isinstance(value, bytes): - try: - if base64.b64encode(base64.b64decode(value)) == value: - lobject.write(base64.b64decode(value)) - else: - lobject.write(value) - except binascii.Error: - lobject.write(value) + lobject.write(value) elif isinstance(value, str): - lobject.write(base64.b64decode(value.encode('ascii'))) + lobject.write(base64.b64decode(value)) else: while True: chunk = value.read(4096)