Fix UnboundLocalError;
Thank you. roughnecks.
This commit is contained in:
parent
ec5550f3d2
commit
72142b575e
1 changed files with 3 additions and 2 deletions
|
@ -1419,6 +1419,7 @@ class HttpInstance:
|
||||||
async def save_get(request: Request):
|
async def save_get(request: Request):
|
||||||
jabber_id = UtilitiesHttp.is_jid_matches_to_session(accounts, sessions, request)
|
jabber_id = UtilitiesHttp.is_jid_matches_to_session(accounts, sessions, request)
|
||||||
if jabber_id:
|
if jabber_id:
|
||||||
|
routine = None
|
||||||
xmpp_instance = accounts[jabber_id]
|
xmpp_instance = accounts[jabber_id]
|
||||||
param_url = request.query_params.get('url', '')
|
param_url = request.query_params.get('url', '')
|
||||||
url_hash = UtilitiesCryptography.hash_url_to_md5(param_url)
|
url_hash = UtilitiesCryptography.hash_url_to_md5(param_url)
|
||||||
|
@ -1436,8 +1437,8 @@ class HttpInstance:
|
||||||
xmlns = '{jabber:x:data}'
|
xmlns = '{jabber:x:data}'
|
||||||
element_value = payload.find('.//' + xmlns + 'field[@var="routine"]/' + xmlns + 'value')
|
element_value = payload.find('.//' + xmlns + 'field[@var="routine"]/' + xmlns + 'value')
|
||||||
if isinstance(element_value, ET.Element): routine = element_value.text
|
if isinstance(element_value, ET.Element): routine = element_value.text
|
||||||
else:
|
# else:
|
||||||
routine = None
|
# routine = None
|
||||||
# NOTE Is "message" missing?
|
# NOTE Is "message" missing?
|
||||||
description = 'Add a new bookmark' # 'Enter properties for a bookmark'
|
description = 'Add a new bookmark' # 'Enter properties for a bookmark'
|
||||||
param_title = request.query_params.get('title', '')
|
param_title = request.query_params.get('title', '')
|
||||||
|
|
Loading…
Reference in a new issue