Fix save dialog upon absence of a routine directory setting.
This commit is contained in:
parent
6934b77bd8
commit
100ccdd489
2 changed files with 6 additions and 2 deletions
|
@ -1531,7 +1531,11 @@ class HttpInstance:
|
||||||
url_hash == iq['pubsub']['items']['item']['id']):
|
url_hash == iq['pubsub']['items']['item']['id']):
|
||||||
return RedirectResponse(url='/url/' + url_hash + '/edit')
|
return RedirectResponse(url='/url/' + url_hash + '/edit')
|
||||||
iq = await XmppPubsub.get_node_item(xmpp_instance, jabber_id, 'xmpp:blasta:settings:0', 'routine')
|
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?
|
# 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', '')
|
||||||
|
|
|
@ -171,7 +171,7 @@ separated). Example: culture, family, leisure, salt lake city (or city:salt-lake
|
||||||
title="Keep link private (whitelist).">
|
title="Keep link private (whitelist).">
|
||||||
Private
|
Private
|
||||||
</label>
|
</label>
|
||||||
<input {% if routine == 'public' or (node and node not in ('private', 'read')) %}checked=""{% endif %}
|
<input {% if not routine or routine == 'public' or (node and node not in ('private', 'read')) %}checked=""{% endif %}
|
||||||
id="public"
|
id="public"
|
||||||
name="node"
|
name="node"
|
||||||
type="radio"
|
type="radio"
|
||||||
|
|
Loading…
Reference in a new issue