Skip to content

Commit 4ebad5f

Browse files
committed
faster check
1 parent a9a9bdf commit 4ebad5f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ayon_api/server_api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,13 @@ def __repr__(self):
321321

322322

323323
def fill_own_attribs(entity):
324-
if not entity or not entity.get("attrib") or "ownAttrib" not in entity:
324+
if not entity or not entity.get("attrib"):
325325
return
326326

327-
attributes = set(entity["ownAttrib"])
327+
attributes = entity.get("ownAttrib")
328+
if attributes is None:
329+
return
330+
attributes = set(attributes)
328331

329332
own_attrib = {}
330333
entity["ownAttrib"] = own_attrib

0 commit comments

Comments
 (0)