You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently there was a change to deserializing when importing a new item. Now the item data is converted to a json string before the deserializer using json.dumps. This causes issues when deserializing decimal values however. So i was wondering why this change was made and if this change could be reverted?
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "/app/lib/python3.11/site-packages/collective/exportimport/import_content.py", line 409, in import_new_content
new = self.handle_new_object(item, index, new)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/collective/exportimport/import_content.py", line 430, in handle_new_object
self.request["BODY"] = json.dumps(item)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Decimal is not JSON serializable
Recently there was a change to deserializing when importing a new item. Now the item data is converted to a json string before the deserializer using json.dumps. This causes issues when deserializing decimal values however. So i was wondering why this change was made and if this change could be reverted?
The text was updated successfully, but these errors were encountered: