From b88fdfde03c4e25e6fb3ed4f0ab66cbd2e2474f6 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 6 Mar 2026 21:28:39 -0500 Subject: [PATCH] still in regression hell --- src/api_hooks.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api_hooks.py b/src/api_hooks.py index 559f651..5d6f2f5 100644 --- a/src/api_hooks.py +++ b/src/api_hooks.py @@ -99,12 +99,14 @@ class HookHandler(BaseHTTPRequestHandler): def get_val(): try: settable = _get_app_attr(app, "_settable_fields", {}) - if field_tag in settable: - attr = settable[field_tag] - val = _get_app_attr(app, attr, "MISSING") - sys.stderr.write(f"[DEBUG] Hook API: get_value {field_tag} -> attr {attr} -> {val}\n") + gettable = _get_app_attr(app, "_gettable_fields", {}) + combined = {**settable, **gettable} + if field_tag in combined: + attr = combined[field_tag] + result["value"] = _get_app_attr(app, attr, None) + else: + sys.stderr.write(f"[DEBUG] Hook API: field {field_tag} not found in settable or gettable\n") sys.stderr.flush() - result["value"] = val if val != "MISSING" else None finally: event.set() lock = _get_app_attr(app, "_pending_gui_tasks_lock") tasks = _get_app_attr(app, "_pending_gui_tasks")