api: Fix regression with listing only enabled apps in mobile app

Closes: #1626

Tests:

- List apps in mobile app front page. Observe that all apps are shown including
  disabled apps.

- With the patch, observer that only enabled apps are shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-08-12 18:26:19 -04:00
1 parent 173d3464b0
commit 03dcaa57da
1 file changed
+1 -1
+1 -1
View File
@@ -54,7 +54,7 @@ def get_shortcuts_as_json(username=None):
shortcuts = [
_get_shortcut_data(shortcut)
for shortcut in frontpage.Shortcut.list(username)
if shortcut.component_id
if shortcut.component_id and shortcut.is_enabled()
]
custom_shortcuts = frontpage.get_custom_shortcuts()
if custom_shortcuts: