mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
ignore empty action key in entity's data
This commit is contained in:
parent
880e625eb2
commit
e17b7cb593
2 changed files with 4 additions and 1 deletions
|
|
@ -158,7 +158,7 @@ class FirstVersionStatus(BaseEvent):
|
|||
filtered_ents = []
|
||||
for entity in event["data"].get("entities", []):
|
||||
# Care only about add actions
|
||||
if entity["action"] != "add":
|
||||
if entity.get("action") != "add":
|
||||
continue
|
||||
|
||||
# Filter AssetVersions
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ class ThumbnailEvents(BaseEvent):
|
|||
"""Updates thumbnails of entities from new AssetVersion."""
|
||||
|
||||
for entity in event["data"].get("entities", []):
|
||||
action = entity.get("action")
|
||||
if not action:
|
||||
continue
|
||||
if (
|
||||
entity["action"] == "remove"
|
||||
or entity["entityType"].lower() != "assetversion"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue