mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merged in hotfix/event_keyerrors_fix (pull request #325)
fixed lines of events where KeyError was raised
This commit is contained in:
commit
98ff411ea2
4 changed files with 4 additions and 4 deletions
|
|
@ -47,7 +47,7 @@ class NextTaskUpdate(BaseEvent):
|
|||
statusid_changes = changes.get('statusid', {})
|
||||
if (
|
||||
entity['entityType'] != 'task' or
|
||||
'statusid' not in entity['keys'] or
|
||||
'statusid' not in (entity.get('keys') or []) or
|
||||
statusid_changes.get('new', None) is None or
|
||||
statusid_changes.get('old', None) is None
|
||||
):
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class ThumbnailEvents(BaseEvent):
|
|||
# entity['action'] == 'encoded'):
|
||||
if (
|
||||
entity['entityType'] == 'assetversion'
|
||||
and 'thumbid' in entity.get('keys', [])
|
||||
and 'thumbid' in (entity.get('keys') or [])
|
||||
):
|
||||
|
||||
version = session.get('AssetVersion', entity['entityId'])
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ class UserAssigmentEvent(BaseEvent):
|
|||
|
||||
def launch(self, session, event):
|
||||
# load shell scripts presets
|
||||
presets = config.get_presets()['ftrack']["user_assigment_event"]
|
||||
presets = config.get_presets()['ftrack'].get("user_assigment_event")
|
||||
if not presets:
|
||||
return
|
||||
for entity in event.get('data', {}).get('entities', []):
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class VersionToTaskStatus(BaseEvent):
|
|||
# Filter non-assetversions
|
||||
if (
|
||||
entity['entityType'] == 'assetversion' and
|
||||
'statusid' in entity.get('keys', [])
|
||||
'statusid' in (entity.get('keys') or [])
|
||||
):
|
||||
|
||||
version = session.get('AssetVersion', entity['entityId'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue