From 100ccdd4890963c4323bac09bb683c78baaaa46e Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Fri, 23 Aug 2024 04:36:10 +0300 Subject: [PATCH] Fix save dialog upon absence of a routine directory setting. --- blasta.py | 6 +++++- xhtml/edit.xhtml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/blasta.py b/blasta.py index 885ed26..ac03331 100644 --- a/blasta.py +++ b/blasta.py @@ -1531,7 +1531,11 @@ class HttpInstance: url_hash == iq['pubsub']['items']['item']['id']): return RedirectResponse(url='/url/' + url_hash + '/edit') iq = await XmppPubsub.get_node_item(xmpp_instance, jabber_id, 'xmpp:blasta:settings:0', 'routine') - routine = iq['pubsub']['items']['item']['payload'].text + if isinstance(iq, slixmpp.stanza.iq.Iq): + payload = iq['pubsub']['items']['item']['payload'] + routine = payload.text if payload else 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', '') diff --git a/xhtml/edit.xhtml b/xhtml/edit.xhtml index 996962f..996677e 100644 --- a/xhtml/edit.xhtml +++ b/xhtml/edit.xhtml @@ -171,7 +171,7 @@ separated). Example: culture, family, leisure, salt lake city (or city:salt-lake title="Keep link private (whitelist)."> Private -