mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
collect matching assets will raise exception only if instance family is psd_batch
This commit is contained in:
parent
5ae59c34d1
commit
037ff552e2
1 changed files with 10 additions and 7 deletions
|
|
@ -29,15 +29,18 @@ class CollectMatchingAssetToInstance(pyblish.api.InstancePlugin):
|
||||||
matching_asset_doc = asset_doc
|
matching_asset_doc = asset_doc
|
||||||
break
|
break
|
||||||
|
|
||||||
if not matching_asset_doc:
|
if matching_asset_doc:
|
||||||
|
instance.data["asset"] = matching_asset_doc["name"]
|
||||||
|
instance.data["assetEntity"] = matching_asset_doc
|
||||||
|
self.log.info(
|
||||||
|
f"Matching asset found: {pformat(matching_asset_doc)}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# QUESTION exception was limited to "psd_batch" family since
|
||||||
|
# it is required for processing
|
||||||
|
elif instance.data["family"] == "psd_batch":
|
||||||
# TODO better error message
|
# TODO better error message
|
||||||
raise AssertionError((
|
raise AssertionError((
|
||||||
"Filename does not contain any name of"
|
"Filename does not contain any name of"
|
||||||
" asset documents in database."
|
" asset documents in database."
|
||||||
))
|
))
|
||||||
|
|
||||||
instance.data["asset"] = matching_asset_doc["name"]
|
|
||||||
instance.data["assetEntity"] = matching_asset_doc
|
|
||||||
self.log.info(
|
|
||||||
f"Matching asset found: {pformat(matching_asset_doc)}"
|
|
||||||
)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue