From e299b405fc01fc6d5daac5d40a6da1b3955853c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Wed, 2 Oct 2024 10:01:33 +0200 Subject: [PATCH] Update server/settings/conversion.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- server/settings/conversion.py | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/server/settings/conversion.py b/server/settings/conversion.py index b933d5856f..aabf41f8d3 100644 --- a/server/settings/conversion.py +++ b/server/settings/conversion.py @@ -14,30 +14,19 @@ def _convert_imageio_configs_0_4_5(overrides): ocio_config_profiles = imageio_overrides["ocio_config_profiles"] - for inx, profile in enumerate(ocio_config_profiles): - if profile["type"] != "product_name": + for profile in ocio_config_profiles: + if profile.get("type") != "product_name": continue - - # create new profile - new_profile = { - "type": "published_product", - "published_product": { - "product_name": profile["product_name"], - "fallback": { - "type": "builtin_path", - "builtin_path": "{BUILTIN_OCIO_ROOT}/aces_1.2/config.ocio", - }, + + profile["type"] = "published_product" + profile["published_product"] = { + "product_name": profile.pop("product_name"), + "fallback": { + "type": "builtin_path", + "builtin_path": "{BUILTIN_OCIO_ROOT}/aces_1.2/config.ocio", }, - "host_names": profile["host_names"], - "task_names": profile["task_names"], - "task_types": profile["task_types"], - "custom_path": profile["custom_path"], - "builtin_path": profile["builtin_path"], } - # replace old profile with new profile - ocio_config_profiles[inx] = new_profile - def _convert_imageio_configs_0_3_1(overrides): """Imageio config settings did change to profiles since 0.3.1. ."""