Skip to content

Commit 2eaf97c

Browse files
authored
Merge pull request #166 from ynput/enhancement/data-is-always-dictionary
Data is always dictionary
2 parents c7c6f8a + 30f2364 commit 2eaf97c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ayon_api/server_api.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -8212,11 +8212,11 @@ def send_batch_operations(
82128212
return op_results
82138213

82148214
def _convert_entity_data(self, entity):
8215-
if not entity:
8215+
if not entity or "data" not in entity:
82168216
return
8217-
entity_data = entity.get("data")
8218-
if (
8219-
entity_data is not None
8220-
and isinstance(entity_data, str)
8221-
):
8222-
entity["data"] = json.loads(entity_data)
8217+
8218+
entity_data = entity["data"] or {}
8219+
if isinstance(entity_data, str):
8220+
entity_data = json.loads(entity_data)
8221+
8222+
entity["data"] = entity_data

0 commit comments

Comments
 (0)