mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
config: Fix error when setting JSXC as the home page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
bd43ed515e
commit
b33b44b526
@ -79,8 +79,10 @@ def get_home_page():
|
|||||||
# match this against the app_id in the entries of frontpage.get_shortcuts()
|
# match this against the app_id in the entries of frontpage.get_shortcuts()
|
||||||
# The underscore is to handle Ikiwiki app_ids
|
# The underscore is to handle Ikiwiki app_ids
|
||||||
app = app_path.strip('/"').replace('/', '_')
|
app = app_path.strip('/"').replace('/', '_')
|
||||||
if app == "index.html":
|
if app == 'index.html':
|
||||||
return "apache-default"
|
return 'apache-default'
|
||||||
|
elif app.endswith('jsxc'):
|
||||||
|
return 'jsxc'
|
||||||
else:
|
else:
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ def change_home_page(app_id):
|
|||||||
if shortcut['id'] == app_id
|
if shortcut['id'] == app_id
|
||||||
][0]
|
][0]
|
||||||
|
|
||||||
actions.superuser_run('config', ['set-home-page', url])
|
actions.superuser_run('config', ['set-home-page', url.strip('/')])
|
||||||
|
|
||||||
|
|
||||||
def set_hostname(hostname):
|
def set_hostname(hostname):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user