mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-07 19:08:32 -05:00
Fix warning
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user