Skip to content

Commit

Permalink
Remove error of edge case that shouldn't happen + cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
BigRoy committed Sep 18, 2024
1 parent 937227c commit d13f202
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client/ayon_ftrack/plugins/launcher_actions/show_in_ftrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ def process(self, selection, **kwargs):
ftrack_addon = self.get_ftrack_addon()
ftrack_url = ftrack_addon.ftrack_url

project_name = selection.project_name
# Project ftrack id
project_entity = selection.get_project_entity()
if not project_entity:
raise ValueError(f"Project {project_name} not found.")

project_ftrack_id = project_entity["attrib"].get(FTRACK_ID_ATTRIB)
if not project_ftrack_id:
project_name = selection.project_name
raise RuntimeError(
f"Project {project_name} has no connected ftrack id.")

# Folder ftrack id (if selected)
entity_ftrack_id = None
folder_entity = selection.get_folder_entity()
if folder_entity:
Expand Down

0 comments on commit d13f202

Please sign in to comment.