mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added version validation for assumed template data
This commit is contained in:
parent
e95d5507d2
commit
8b2a129066
2 changed files with 11 additions and 2 deletions
|
|
@ -127,7 +127,6 @@ class CollectLook(pyblish.api.InstancePlugin):
|
|||
# Collect textures,
|
||||
resources = [self.collect_resource(n) for n in files]
|
||||
instance.data["resources"] = resources
|
||||
# pprint.pprint(resources)
|
||||
|
||||
# Log a warning when no relevant sets were retrieved for the look.
|
||||
if not instance.data["lookData"]["sets"]:
|
||||
|
|
|
|||
|
|
@ -109,7 +109,17 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
|
|||
if latest_version is not None:
|
||||
next_version += latest_version["name"]
|
||||
|
||||
self.log.debug("Next version: %i" % next_version)
|
||||
self.log.info("Verifying version from assumed destination")
|
||||
|
||||
assumed_data = instance.data["assumedTemplateData"]
|
||||
assumed_version = assumed_data["version"]
|
||||
if assumed_version != next_version:
|
||||
raise AttributeError("Assumed version 'v{0:03d}' does not match"
|
||||
"next version in database "
|
||||
"('v{1:03d}')".format(assumed_version,
|
||||
next_version))
|
||||
|
||||
self.log.debug("Next version: v{0:03d}".format(next_version))
|
||||
|
||||
version_data = self.create_version_data(context, instance)
|
||||
version = self.create_version(subset=subset,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue