mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
Fix: dont exclude documents in trash from sanity check (#7133)
This commit is contained in:
parent
dd878c8d70
commit
d35e350c79
@ -34,7 +34,7 @@ class SanityCheckMessages:
|
|||||||
logger.info("Sanity checker detected no issues.")
|
logger.info("Sanity checker detected no issues.")
|
||||||
else:
|
else:
|
||||||
# Query once
|
# Query once
|
||||||
all_docs = Document.objects.all()
|
all_docs = Document.global_objects.all()
|
||||||
|
|
||||||
for doc_pk in self._messages:
|
for doc_pk in self._messages:
|
||||||
if doc_pk is not None:
|
if doc_pk is not None:
|
||||||
@ -68,7 +68,7 @@ def check_sanity(progress=False) -> SanityCheckMessages:
|
|||||||
if lockfile in present_files:
|
if lockfile in present_files:
|
||||||
present_files.remove(lockfile)
|
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
|
# Check sanity of the thumbnail
|
||||||
thumbnail_path: Final[Path] = Path(doc.thumbnail_path).resolve()
|
thumbnail_path: Final[Path] = Path(doc.thumbnail_path).resolve()
|
||||||
if not thumbnail_path.exists() or not thumbnail_path.is_file():
|
if not thumbnail_path.exists() or not thumbnail_path.is_file():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user