mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +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()
|
||||
# The underscore is to handle Ikiwiki app_ids
|
||||
app = app_path.strip('/"').replace('/', '_')
|
||||
if app == "index.html":
|
||||
return "apache-default"
|
||||
if app == 'index.html':
|
||||
return 'apache-default'
|
||||
elif app.endswith('jsxc'):
|
||||
return 'jsxc'
|
||||
else:
|
||||
return app
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ def change_home_page(app_id):
|
||||
if shortcut['id'] == app_id
|
||||
][0]
|
||||
|
||||
actions.superuser_run('config', ['set-home-page', url])
|
||||
actions.superuser_run('config', ['set-home-page', url.strip('/')])
|
||||
|
||||
|
||||
def set_hostname(hostname):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user