From c55ca5af2d2b4d6050b2b6bcd2d913028aa6ceee Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 5 Oct 2021 10:26:17 +0200 Subject: [PATCH] skip keys before they're checked --- .../modules/default_modules/ftrack/ftrack_module.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openpype/modules/default_modules/ftrack/ftrack_module.py b/openpype/modules/default_modules/ftrack/ftrack_module.py index bfcecabafe..9cbf979239 100644 --- a/openpype/modules/default_modules/ftrack/ftrack_module.py +++ b/openpype/modules/default_modules/ftrack/ftrack_module.py @@ -277,15 +277,17 @@ class FtrackModule( failed = {} missing = {} for key, value in attributes_changes.items(): + if key not in ca_keys: + continue + configuration = hier_attrs_by_key.get(key) if not configuration: configuration = cust_attr_by_key.get(key) if not configuration: - if key in ca_keys: - self.log.warning( - "Custom attribute \"{}\" was not found.".format(key) - ) - missing[key] = value + self.log.warning( + "Custom attribute \"{}\" was not found.".format(key) + ) + missing[key] = value continue # TODO add add permissions check