mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-10 00:18:57 +00:00
Chore: Switch from os.path to pathlib.Path (#8325)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
d06aac947d
commit
935d077836
@@ -2139,7 +2139,7 @@ class SystemStatusView(PassUserMixin):
|
||||
classifier_error = None
|
||||
classifier_status = None
|
||||
try:
|
||||
classifier = load_classifier()
|
||||
classifier = load_classifier(raise_exception=True)
|
||||
if classifier is None:
|
||||
# Make sure classifier should exist
|
||||
docs_queryset = Document.objects.exclude(
|
||||
@@ -2159,7 +2159,7 @@ class SystemStatusView(PassUserMixin):
|
||||
matching_algorithm=Tag.MATCH_AUTO,
|
||||
).exists()
|
||||
)
|
||||
and not os.path.isfile(settings.MODEL_FILE)
|
||||
and not settings.MODEL_FILE.exists()
|
||||
):
|
||||
# if classifier file doesn't exist just classify as a warning
|
||||
classifier_error = "Classifier file does not exist (yet). Re-training may be pending."
|
||||
|
Reference in New Issue
Block a user