From 68e2648a4c7a93cf7ba11618e2741dbf4ff85794 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 4 Jan 2021 16:52:54 +0100 Subject: [PATCH] prepare task types before entities loop --- pype/modules/ftrack/lib/avalon_sync.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pype/modules/ftrack/lib/avalon_sync.py b/pype/modules/ftrack/lib/avalon_sync.py index e0842a26c5..b4b65551fe 100644 --- a/pype/modules/ftrack/lib/avalon_sync.py +++ b/pype/modules/ftrack/lib/avalon_sync.py @@ -452,6 +452,11 @@ class SyncEntitiesFactory: all_project_entities = self.session.query( self.entities_query.format(ft_project_id) ).all() + task_types = self.session.query("select id, name from Type").all() + task_type_names_by_id = { + task_type["id"]: task_type["name"] + for task_type in task_types + } for entity in all_project_entities: parent_id = entity["parent_id"] entity_type = entity.entity_type