From 03dcaa57da1f6370790c80f4ca7cf8e4bd2baeb3 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 12 Aug 2019 15:00:17 -0700 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- plinth/modules/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/api/views.py b/plinth/modules/api/views.py index 8c89ebb04..a1c5ebdc7 100644 --- a/plinth/modules/api/views.py +++ b/plinth/modules/api/views.py @@ -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: