mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
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:
commit
533da5f54c
1 changed files with 7 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue