From f2edc6ab2b2b5de7aa3150a976a0d8881aaeac72 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 26 Jun 2025 18:25:23 -0700 Subject: [PATCH] app: Don't load apps again - Only effective once. Second call will skip loading apps. - Helps with privileged daemon where actions might load apps repeatedly. Tests: - Diagnostics/enable/disable for apps bepasty, updates, config, security, nextcloud, homeassistant run fine. - Install/uninstall for bepasty works fine. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Joseph Nuthalapati --- plinth/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plinth/app.py b/plinth/app.py index 0d4a62f4b..a7882ba2a 100644 --- a/plinth/app.py +++ b/plinth/app.py @@ -596,6 +596,9 @@ class EnableState(LeaderComponent): def apps_init(): """Create apps by constructing them with components.""" + if App.list(): + return # Apps have already been initialized + from . import module_loader # noqa # Avoid circular import for module_name, module in module_loader.loaded_modules.items(): _initialize_module(module_name, module)