mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
setup: Use apps instead of modules to determine running first setup
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
7eab8a2cda
commit
b9dc2d38f6
@ -240,12 +240,10 @@ def _get_apps_for_regular_setup():
|
||||
|
||||
|
||||
def _set_is_first_setup():
|
||||
"""Set whether all essential modules have been setup at least once."""
|
||||
"""Set whether all essential apps have been setup at least once."""
|
||||
global _is_first_setup
|
||||
modules = plinth.module_loader.loaded_modules.values()
|
||||
_is_first_setup = any(
|
||||
(module for module in modules
|
||||
if module.app.info.is_essential and module.app.needs_setup()))
|
||||
_is_first_setup = any((app for app in app_module.App.list()
|
||||
if app.info.is_essential and app.needs_setup()))
|
||||
|
||||
|
||||
def run_setup_on_apps(app_ids, allow_install=True):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user