From 06f067fda9d44c885286882e865795e3e428c27f Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 22 Aug 2024 15:03:39 +0200 Subject: [PATCH] refacfix --- backend/apps/webui/main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/apps/webui/main.py b/backend/apps/webui/main.py index a039de895..3b2df3988 100644 --- a/backend/apps/webui/main.py +++ b/backend/apps/webui/main.py @@ -258,11 +258,10 @@ def get_function_params(function_module, form_data, user, extra_params=None): if "__user__" in params and hasattr(function_module, "UserValves"): user_valves = Functions.get_user_valves_by_id_and_user_id(pipe_id, user.id) - if user_valves is not None: - try: - params["__user__"]["valves"] = function_module.UserValves(**user_valves) - except Exception as e: - log.exception(e) + params["__user__"]["valves"] = function_module.UserValves( + **(user_valves if user_valves else {}) + ) + return params