mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Refactor to use variable node_value instead of value
- `value` only exists as the last variable value in the `for value in values` loop and might not be declared if `values` is an empty iterable.
This commit is contained in:
parent
70d8c72c96
commit
1f1676f5bb
1 changed files with 1 additions and 2 deletions
|
|
@ -111,7 +111,6 @@ class ValidateNukeWriteNode(
|
||||||
for value in values:
|
for value in values:
|
||||||
if type(node_value) in (int, float):
|
if type(node_value) in (int, float):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
value = color_gui_to_int(value)
|
value = color_gui_to_int(value)
|
||||||
else:
|
else:
|
||||||
|
|
@ -130,7 +129,7 @@ class ValidateNukeWriteNode(
|
||||||
and key != "file"
|
and key != "file"
|
||||||
and key != "tile_color"
|
and key != "tile_color"
|
||||||
):
|
):
|
||||||
check.append([key, value, write_node[key].value()])
|
check.append([key, node_value, write_node[key].value()])
|
||||||
|
|
||||||
if check:
|
if check:
|
||||||
self._make_error(check)
|
self._make_error(check)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue