Merge pull request #2214 from pypeclub/bugfix/project_from_entity_fix

Ftrack: Base event fix of 'get_project_from_entity' method
This commit is contained in:
Jakub Trllo 2021-11-12 19:39:08 +01:00 committed by GitHub
commit 533da5f54c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -570,9 +570,15 @@ class BaseHandler(object):
if low_entity_type == "assetversion":
asset = entity["asset"]
parent = None
if asset:
parent = asset["parent"]
if parent:
if parent:
if parent.entity_type.lower() == "project":
return parent
if "project" in parent:
return parent["project"]
project_data = entity["link"][0]