Skip to content

Commit 30f2364

Browse files
committed
simplify data conversion
1 parent 46838fd commit 30f2364

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ayon_api/server_api.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8137,11 +8137,8 @@ def _convert_entity_data(self, entity):
81378137
if not entity or "data" not in entity:
81388138
return
81398139

8140-
entity_data = entity["data"]
8141-
if entity_data is None:
8142-
entity_data = {}
8143-
8144-
elif isinstance(entity_data, str):
8140+
entity_data = entity["data"] or {}
8141+
if isinstance(entity_data, str):
81458142
entity_data = json.loads(entity_data)
81468143

81478144
entity["data"] = entity_data

0 commit comments

Comments
 (0)