Skip to content

Commit

Permalink
Fix - use differently named variable
Browse files Browse the repository at this point in the history
Original `instance` variable might shadow wanted `render-like` instance if wrong order of instances get processed.
  • Loading branch information
kalisp committed Apr 11, 2024
1 parent 129d5d6 commit cc42c4d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ def process(self, instance):

# Collect all saver instances in context that are to be rendered
saver_instances = []
for instance in context:
if instance.data["productType"] != "render":
for inst in context:
if inst.data["productType"] != "render":
# Allow only saver family instances
continue

if not instance.data.get("publish", True):
if not inst.data.get("publish", True):
# Skip inactive instances
continue

self.log.debug(instance.data["name"])
saver_instances.append(instance)
self.log.debug(inst.data["name"])
saver_instances.append(inst)

if not saver_instances:
raise RuntimeError("No instances found for Deadline submission")
Expand Down

0 comments on commit cc42c4d

Please sign in to comment.