setup: Run setup on apps instead of modules

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-12-04 16:39:01 -05:00
1 parent f2af08d8a6
commit a0a6e1d362
3 files changed
+41 -40

No files matched your search

+3 -3
View File
@@ -173,14 +173,14 @@ def _install_apps_before_restore(components):
data getting backed up into older version of the app.
"""
modules_to_setup = []
apps_to_setup = []
for component in components:
if component.app.get_setup_state() in (
app_module.App.SetupState.NEEDS_SETUP,
app_module.App.SetupState.NEEDS_UPDATE):
modules_to_setup.append(component.app.app_id)
apps_to_setup.append(component.app.app_id)
setup.run_setup_on_modules(modules_to_setup)
setup.run_setup_on_apps(apps_to_setup)
def _get_backup_restore_component(app):