From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:47:05 +0000 (-0700) Subject: Fix: dont exclude documents in trash from sanity check (#7133) X-Git-Tag: v2.11.0~1^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d35e350c798df8eeee8a718e04c7653833ba2570;p=thirdparty%2Fpaperless-ngx.git Fix: dont exclude documents in trash from sanity check (#7133) --- diff --git a/src/documents/sanity_checker.py b/src/documents/sanity_checker.py index bff1c41d76..9d44ff345d 100644 --- a/src/documents/sanity_checker.py +++ b/src/documents/sanity_checker.py @@ -34,7 +34,7 @@ class SanityCheckMessages: logger.info("Sanity checker detected no issues.") else: # Query once - all_docs = Document.objects.all() + all_docs = Document.global_objects.all() for doc_pk in self._messages: if doc_pk is not None: @@ -68,7 +68,7 @@ def check_sanity(progress=False) -> SanityCheckMessages: if lockfile in present_files: present_files.remove(lockfile) - for doc in tqdm(Document.objects.all(), disable=not progress): + for doc in tqdm(Document.global_objects.all(), disable=not progress): # Check sanity of the thumbnail thumbnail_path: Final[Path] = Path(doc.thumbnail_path).resolve() if not thumbnail_path.exists() or not thumbnail_path.is_file():