Skip to content
Snippets Groups Projects
Commit 32b885b9 authored by Dorian Koch's avatar Dorian Koch Committed by Simon Künzel
Browse files

Fix object serialization

parent 6b1f4d26
No related branches found
No related tags found
No related merge requests found
...@@ -333,10 +333,10 @@ class ApiObjectClass: ...@@ -333,10 +333,10 @@ class ApiObjectClass:
context = getattr(args, context_name) context = getattr(args, context_name)
if not isinstance(context, dict): if not isinstance(context, dict):
raise Exception(f"serialization argument '{context_name}' must be a dict") raise Exception(f"serialization argument '{context_name}' must be a dict")
if str(self.id) not in context: if str(obj.id) not in context:
context[str(self.id)] = None # Indicate that object is being serialized. Prevent loops context[str(obj.id)] = None # Indicate that object is being serialized. Prevent loops
context[str(self.id)] = self.serialize_object_args(obj, args, to_context=False) context[str(obj.id)] = self.serialize_object_args(obj, args, to_context=False)
return self.id return obj.id
def get_creation_config(self) -> JsonTypes or None: def get_creation_config(self) -> JsonTypes or None:
if not self.enable_config: if not self.enable_config:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment