Merge pull request #3342 from pypeclub/bugfix/empty_source_key_on_instance_dev

General: Handle empty source key on instance
This commit is contained in:
Jakub Trllo 2022-06-14 18:30:47 +02:00 committed by GitHub
commit f72e0912da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -940,9 +940,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
families += current_families
# create relative source path for DB
if "source" in instance.data:
source = instance.data["source"]
else:
source = instance.data.get("source")
if not source:
source = context.data["currentFile"]
anatomy = instance.context.data["anatomy"]
source = self.get_rootless_path(anatomy, source)