From de7ff953d8e67d892eed96e4d33d567234d8398c Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 9 Apr 2021 18:32:13 +0200 Subject: [PATCH] create update custom attributes can ignore missing pypeclub role --- pype/modules/ftrack/actions/action_create_cust_attrs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pype/modules/ftrack/actions/action_create_cust_attrs.py b/pype/modules/ftrack/actions/action_create_cust_attrs.py index 21c4743725b..be7d1693605 100644 --- a/pype/modules/ftrack/actions/action_create_cust_attrs.py +++ b/pype/modules/ftrack/actions/action_create_cust_attrs.py @@ -199,6 +199,9 @@ def prepare_global_data(self, session): for role in session.query("SecurityRole").all() } + if "pypeclub" not in self.security_roles: + self.log.info("Pypeclub role is not available. Will be skipped.") + object_types = session.query("ObjectType").all() self.object_types_per_id = { object_type["id"]: object_type for object_type in object_types @@ -752,6 +755,8 @@ def get_security_roles(self, security_roles): for role_name in security_roles_lowered: if role_name in self.security_roles: output.append(self.security_roles[role_name]) + elif role_name == "pypeclub": + continue else: raise CustAttrException(( "Securit role \"{}\" was not found in Ftrack."