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 -