From 72142b575e0e6f676b9626b3a4af1f131a1877aa Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Sun, 15 Dec 2024 22:10:56 +0200 Subject: [PATCH] Fix UnboundLocalError; Thank you. roughnecks. --- blasta/http/instance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blasta/http/instance.py b/blasta/http/instance.py index 03a83ab..b6f5b5b 100644 --- a/blasta/http/instance.py +++ b/blasta/http/instance.py @@ -1419,6 +1419,7 @@ class HttpInstance: async def save_get(request: Request): jabber_id = UtilitiesHttp.is_jid_matches_to_session(accounts, sessions, request) if jabber_id: + routine = None xmpp_instance = accounts[jabber_id] param_url = request.query_params.get('url', '') url_hash = UtilitiesCryptography.hash_url_to_md5(param_url) @@ -1436,8 +1437,8 @@ class HttpInstance: xmlns = '{jabber:x:data}' element_value = payload.find('.//' + xmlns + 'field[@var="routine"]/' + xmlns + 'value') if isinstance(element_value, ET.Element): routine = element_value.text - else: - routine = None + # else: + # routine = None # NOTE Is "message" missing? description = 'Add a new bookmark' # 'Enter properties for a bookmark' param_title = request.query_params.get('title', '')