From b949f971dcbf068364915b8b3b6ab48c0872e811 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Tue, 11 Mar 2025 19:40:53 -0400 Subject: [PATCH] Add unwrap widget value support --- execution.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/execution.py b/execution.py index 2c979205b..52ed0e406 100644 --- a/execution.py +++ b/execution.py @@ -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",