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:
Joseph Nuthalapati authored and James Valleroy committed 2019-02-23 10:31:08 -05:00
1 parent bd43ed515e
commit b33b44b526
2 files changed
+5 -3

No files matched your search

+4 -2
View File
@@ -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
+1 -1
View File
@@ -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):