Merge pull request #2250 from pypeclub/bugfix/ftrack_set_ftrack_id_back_to_project

Ftrack: Sync project ftrack id cache issue
This commit is contained in:
Jakub Trllo 2021-11-15 17:41:35 +01:00 committed by GitHub
commit 17848c8aac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,6 +194,7 @@ class SyncToAvalonEvent(BaseEvent):
ftrack_id = proj["data"].get("ftrackId")
if ftrack_id is None:
ftrack_id = self._update_project_ftrack_id()
proj["data"]["ftrackId"] = ftrack_id
self._avalon_ents_by_ftrack_id[ftrack_id] = proj
for ent in ents:
ftrack_id = ent["data"].get("ftrackId")
@ -584,6 +585,10 @@ class SyncToAvalonEvent(BaseEvent):
continue
ftrack_id = ftrack_id[0]
# Skip deleted projects
if action == "remove" and entityType == "show":
return True
# task modified, collect parent id of task, handle separately
if entity_type.lower() == "task":
changes = ent_info.get("changes") or {}