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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-11-15 12:49:48 -08:00 committed by James Valleroy
parent 3c44fa9a07
commit fa48fafa6b
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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