From 93f64acff0e91eeeeb27551e14a8e9513d79acef Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 24 Feb 2022 11:51:54 +0100 Subject: [PATCH] flame: code simplification --- .../startup/openpype_babypublisher/modules/ftrack_lib.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openpype/hosts/flame/startup/openpype_babypublisher/modules/ftrack_lib.py b/openpype/hosts/flame/startup/openpype_babypublisher/modules/ftrack_lib.py index c2168016c6..0a601a8804 100644 --- a/openpype/hosts/flame/startup/openpype_babypublisher/modules/ftrack_lib.py +++ b/openpype/hosts/flame/startup/openpype_babypublisher/modules/ftrack_lib.py @@ -392,10 +392,7 @@ class FtrackEntityOperator: query = '{} where name is "{}" and project_id is "{}"'.format( type, name, self.project_entity["id"]) - try: - entity = session.query(query).one() - except Exception: - entity = None + entity = session.query(query).first() # if entity doesnt exist then create one if not entity: