gitweb: Split app initialization

Tests:

- When a public repo is added, upon startup, the front page shortcut is shown.

- When all public repos are removed, upon startup, the front page shortcut is
not 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 2021-11-15 10:14:14 -05:00
1 parent 9c091df245
commit 3c44fa9a07
1 file changed
+2
+2
View File
@@ -97,6 +97,8 @@ class GitwebApp(app_module.App):
**manifest.backup)
self.add(backup_restore)
def post_init(self):
"""Perform post initialization operations."""
setup_helper = globals()['setup_helper']
if setup_helper.get_state() != 'needs-setup':
self.update_service_access()