security: Drop use of managed_services in security report

Use Daemon component instead.

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:35:30 -05:00
1 parent 84ae338e66
commit 9ec0c5f3db
1 file changed
+5 -4
+5 -4
View File
@@ -12,6 +12,7 @@ from django.utils.translation import gettext_lazy as _
from plinth import actions
from plinth import app as app_module
from plinth import menu, module_loader
from plinth.daemon import Daemon
from plinth.modules.backups.components import BackupRestore
from plinth.package import Packages
@@ -137,10 +138,10 @@ def get_apps_report():
if not packages:
continue # app has no managed packages
try:
services = module.managed_services
except AttributeError:
services = None
components = module.app.get_components_of_type(Daemon)
services = []
for component in components:
services.append(component.unit)
# filter out apps not setup yet
if module.setup_helper.get_state() == 'needs-setup':