Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Ftrack optional pypclub role #1303

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pype/modules/ftrack/actions/action_create_cust_attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down