Add unwrap widget value support

This commit is contained in:
Chenlei Hu 2025-03-11 19:40:53 -04:00
parent ee8a7ab69d
commit b949f971dc

View File

@ -646,6 +646,12 @@ def validate_inputs(prompt, item, validated):
if type_input == "BOOLEAN":
val = bool(val)
inputs[x] = val
# Unwraps values wrapped in __value__ key. This is used to pass
# list widget value to execution, as by default list value is
# reserved to represent the connection between nodes.
if isinstance(val, dict) and "__value__" in val:
val = val["__value__"]
inputs[x] = val
except Exception as ex:
error = {
"type": "invalid_input_type",