From 7c0ecdfec6e9238599d357eb55e9a2b292015df4 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Fri, 22 Feb 2019 15:37:07 +0100 Subject: [PATCH] minor change in app handler --- pype/ftrack/lib/ftrack_app_handler.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pype/ftrack/lib/ftrack_app_handler.py b/pype/ftrack/lib/ftrack_app_handler.py index 35289f484e..25ed81946a 100644 --- a/pype/ftrack/lib/ftrack_app_handler.py +++ b/pype/ftrack/lib/ftrack_app_handler.py @@ -1,5 +1,3 @@ -# :coding: utf-8 -# :copyright: Copyright (c) 2017 ftrack import os import sys import platform @@ -86,17 +84,13 @@ class AppAction(BaseHandler): ''' - entity = entities[0] - - # TODO Should return False if not TASK ?!!! - # TODO Should return False if more than one entity is selected ?!!! if ( - len(entities) > 1 or - entity.entity_type.lower() != 'task' + len(entities) != 1 or + entities[0].entity_type.lower() != 'task' ): return False - ft_project = entity['project'] + ft_project = entities[0]['project'] database = pypelib.get_avalon_database() project_name = ft_project['full_name']