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 2019-02-21 19:47:15 +05:30 committed by James Valleroy
parent bd43ed515e
commit b33b44b526
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 5 additions and 3 deletions

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

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):