minor change in app handler

This commit is contained in:
Jakub Trllo 2019-02-22 15:37:07 +01:00
parent 3cd7099a3a
commit 7c0ecdfec6

View file

@ -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']