Merged in feature/PYPE-187_not_update_templates (pull request #72)

project templates are used if templates already exist in project

Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
Jakub Trllo 2019-02-15 14:26:16 +00:00 committed by Milan Kolar
commit 5d2c37d9d6

View file

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