mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
frontpage: Fix regression with loading custom shortcuts
Closes: #1621 This causes the freedombox service to fail to start (and restart continuously) when a custom shortcuts are provided using JSON file. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
639fd71d88
commit
063489c036
@ -146,8 +146,12 @@ def add_custom_shortcuts():
|
|||||||
if not web_app_url:
|
if not web_app_url:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
Shortcut(None, shortcut['name'], shortcut['short_description'],
|
shortcut_id = shortcut.get('id', shortcut['name'])
|
||||||
icon=shortcut['icon_url'], url=web_app_url)
|
component_id = 'shortcut-custom-' + shortcut_id
|
||||||
|
component = Shortcut(component_id, shortcut['name'],
|
||||||
|
shortcut['short_description'],
|
||||||
|
icon=shortcut['icon_url'], url=web_app_url)
|
||||||
|
component.set_enabled(True)
|
||||||
|
|
||||||
|
|
||||||
def _extract_web_app_url(custom_shortcut):
|
def _extract_web_app_url(custom_shortcut):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user