From 5cee6563cce8a8c1f84fe479121b08755969faba Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 18 Aug 2025 20:20:01 -0700 Subject: [PATCH] diagnostics: Fix notification severity when skipping tests Fixes: #2531. - Currently, when a diagnostics test is skipped, the notification shows up with 'error' severity. Instead of this, treat 'skipped' and 'not done' tests as passed for the purpose of the notification. Tests: - Change code in package.py to set the result of diagnostic test to be 'SKIPPED' and 'NOT_DONE', in both cases, the notification is not shown after running full diagnostic runs. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Joseph Nuthalapati --- plinth/modules/diagnostics/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/diagnostics/__init__.py b/plinth/modules/diagnostics/__init__.py index f86280da9..33ad68431 100644 --- a/plinth/modules/diagnostics/__init__.py +++ b/plinth/modules/diagnostics/__init__.py @@ -292,7 +292,8 @@ def _run_diagnostics(): severity = 'error' else: for check in app_data['diagnosis']: - if check.result != Result.PASSED: + if check.result not in (Result.PASSED, Result.NOT_DONE, + Result.SKIPPED): apps_with_issues.add(app_id) issue_count += 1 if check.result != Result.WARNING: