mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix add task to assetversion only if needed
This commit is contained in:
parent
e231f4f5d2
commit
474e241e16
1 changed files with 3 additions and 2 deletions
|
|
@ -144,8 +144,6 @@ class IntegrateFtrackApi(pyblish.api.InstancePlugin):
|
|||
"version": 0,
|
||||
"asset": asset_entity,
|
||||
}
|
||||
if task:
|
||||
assetversion_data['task'] = task
|
||||
|
||||
assetversion_data.update(data.get("assetversion_data", {}))
|
||||
|
||||
|
|
@ -157,6 +155,9 @@ class IntegrateFtrackApi(pyblish.api.InstancePlugin):
|
|||
# due to a ftrack_api bug where you can't add metadata on creation.
|
||||
assetversion_metadata = assetversion_data.pop("metadata", {})
|
||||
|
||||
if task:
|
||||
assetversion_data['task'] = task
|
||||
|
||||
# Create a new entity if none exits.
|
||||
if not assetversion_entity:
|
||||
assetversion_entity = session.create(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue