mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fixed variable called before declared
This commit is contained in:
parent
ddceb3d4f6
commit
d01427c496
1 changed files with 4 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import avalon.io as io
|
|||
|
||||
|
||||
class CollectAssumedDestination(pyblish.api.InstancePlugin):
|
||||
"""This plug-ins displays the comment dialog box per default"""
|
||||
"""Generate the assumed destination path where the file will be stored"""
|
||||
|
||||
label = "Collect Assumed Destination"
|
||||
order = pyblish.api.CollectorOrder + 0.499
|
||||
|
|
@ -81,12 +81,14 @@ class CollectAssumedDestination(pyblish.api.InstancePlugin):
|
|||
"parent": asset["_id"]})
|
||||
|
||||
# assume there is no version yet, we start at `1`
|
||||
version = None
|
||||
version_number = 1
|
||||
if subset is not None:
|
||||
version = io.find_one({"type": "version",
|
||||
"parent": subset["_id"]},
|
||||
sort=[("name", -1)])
|
||||
# if there is a subset there ought to be version
|
||||
# if there is a subset there ought to be version
|
||||
if version is not None:
|
||||
version_number += version["name"]
|
||||
|
||||
template_data = {"root": os.environ["AVALON_PROJECTS"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue