From 7f02f782f4960b4b24efbb993600f5cb33faf5f6 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Thu, 13 Feb 2025 21:30:25 -0800
Subject: [PATCH] Fix warning
---
src-ui/messages.xlf | 4 ++--
.../system-status-dialog.component.html | 16 ++++++++++------
src/documents/tests/test_api_status.py | 2 --
src/documents/views.py | 2 ++
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index 716f3a39b..2a79cbee0 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -5548,7 +5548,7 @@
src/app/components/common/system-status-dialog/system-status-dialog.component.html
- 172
+ 176
src/app/components/manage/mail/mail.component.html
@@ -6027,7 +6027,7 @@
Last Run
src/app/components/common/system-status-dialog/system-status-dialog.component.html
- 155
+ 159
diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
index 091123fc9..9e79d3ce7 100644
--- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
+++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.html
@@ -128,11 +128,11 @@
}
} @else {
-
+
}
@@ -148,7 +148,11 @@
}
} @else {
-
+
}
diff --git a/src/documents/tests/test_api_status.py b/src/documents/tests/test_api_status.py
index 6bbb4dcb0..ca86954a8 100644
--- a/src/documents/tests/test_api_status.py
+++ b/src/documents/tests/test_api_status.py
@@ -225,7 +225,6 @@ class TestSystemStatus(APITestCase):
response.data["tasks"]["classifier_status"],
"WARNING",
)
- self.assertIsNone(response.data["tasks"]["classifier_error"])
def test_system_status_classifier_error(self):
"""
@@ -287,7 +286,6 @@ class TestSystemStatus(APITestCase):
response.data["tasks"]["sanity_check_status"],
"WARNING",
)
- self.assertIsNone(response.data["tasks"]["sanity_check_error"])
def test_system_status_sanity_check_error(self):
"""
diff --git a/src/documents/views.py b/src/documents/views.py
index d9bd2f585..67041a4ac 100644
--- a/src/documents/views.py
+++ b/src/documents/views.py
@@ -2670,6 +2670,7 @@ class SystemStatusView(PassUserMixin):
classifier_error = None
if last_trained_task is None:
classifier_status = "WARNING"
+ classifier_error = "No classifier training tasks found"
elif last_trained_task and last_trained_task.status == states.FAILURE:
classifier_status = "ERROR"
classifier_error = last_trained_task.result
@@ -2688,6 +2689,7 @@ class SystemStatusView(PassUserMixin):
sanity_check_error = None
if last_sanity_check is None:
sanity_check_status = "WARNING"
+ sanity_check_error = "No sanity check tasks found"
elif last_sanity_check and last_sanity_check.status == states.FAILURE:
sanity_check_status = "ERROR"
sanity_check_error = last_sanity_check.result