Fix UnboundLocalError;

Thank you. roughnecks.
This commit is contained in:
Schimon Jehudah, Adv. 2024-12-15 22:10:56 +02:00
parent ec5550f3d2
commit 72142b575e

View file

@ -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', '')