OP-2579 - fix broken settings after change

This commit is contained in:
Petr Kalis 2022-02-08 13:35:01 +01:00
parent b162ee9c38
commit 32e344bb27

View file

@ -359,12 +359,20 @@ class ConfiguredExtensionsEndpoint(_RestApiEndpoint):
"studio_exts": set(["psd", "psb", "tvpp", "tvp"]) "studio_exts": set(["psd", "psb", "tvpp", "tvp"])
} }
collect_conf = sett["webpublisher"]["publish"]["CollectPublishedFiles"] collect_conf = sett["webpublisher"]["publish"]["CollectPublishedFiles"]
for _, mapping in collect_conf.get("task_type_to_family", {}).items(): configs = collect_conf.get("task_type_to_family", [])
for _family, config in mapping.items(): mappings = []
if config["is_sequence"]: if isinstance(configs, dict): # backward compatibility, remove soon
configured["sequence_exts"].update(config["extensions"]) # mappings = [mapp for mapp in configs.values() if mapp]
else: for _, conf_mappings in configs.items():
configured["file_exts"].update(config["extensions"]) for conf_mapping in conf_mappings:
mappings.append(conf_mapping)
else:
mappings = configs
for mapping in mappings:
if mapping["is_sequence"]:
configured["sequence_exts"].update(mapping["extensions"])
else:
configured["file_exts"].update(mapping["extensions"])
return Response( return Response(
status=200, status=200,