From fa48fafa6be550493627f39a70f56206c8a53082 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 15 Nov 2021 12:49:48 -0800 Subject: [PATCH] frontpage: Avoid URL reverse during Shortcut component construction This allows the entire app construction process not to require Django. Tests: - An app with url is None (ejabberd) and one without (transmission) show their on the frontpage. Both shortcuts work as expected. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/frontpage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/frontpage.py b/plinth/frontpage.py index 748730bce..741211158 100644 --- a/plinth/frontpage.py +++ b/plinth/frontpage.py @@ -70,7 +70,7 @@ class Shortcut(app.FollowerComponent): """ super().__init__(component_id) - if not url: + if url is None: url = '?selected={id}'.format(id=component_id) self.name = name