Merge branch '2.x/develop' into 2.x/feature/standalone_editorial

This commit is contained in:
Toke Stuart Jepsen 2020-06-11 15:19:34 +01:00
commit 46fefedae5
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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"