From 9f001cb8fdbc60b120b5e5cf4962e1df95dcab6f Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Fri, 15 Feb 2019 10:42:26 +0100 Subject: [PATCH] change so project templates are used if templates already exist in project --- pype/ftrack/lib/avalon_sync.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pype/ftrack/lib/avalon_sync.py b/pype/ftrack/lib/avalon_sync.py index 346bdceeb9..4b058fa3c3 100644 --- a/pype/ftrack/lib/avalon_sync.py +++ b/pype/ftrack/lib/avalon_sync.py @@ -114,6 +114,18 @@ def import_to_avalon( output['errors'] = errors return output + else: + # not override existing templates! + templates = av_project['config'].get('template', None) + if templates is not None: + for key, value in config['template'].items(): + if ( + key in templates and + templates[key] is not None and + templates[key] != value + ): + config['template'][key] = templates[key] + projectId = av_project['_id'] data = get_data(