From d2a0fb6bb0da1bf481a3b2417bca2cebac4a4e03 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Wed, 12 Mar 2025 06:39:14 -0400 Subject: [PATCH] Add unwrap widget value support (#7197) * Add unwrap widget value support * nit --- execution.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/execution.py b/execution.py index 2c979205..fcb4f6f4 100644 --- a/execution.py +++ b/execution.py @@ -634,6 +634,13 @@ def validate_inputs(prompt, item, validated): continue else: try: + # 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 + if type_input == "INT": val = int(val) inputs[x] = val