mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-28 01:26:14 +00:00
Add --no-progress-bar option to commands
This commit is contained in:
@@ -60,12 +60,7 @@ def check_sanity(progress=False):
|
||||
if lockfile in present_files:
|
||||
present_files.remove(lockfile)
|
||||
|
||||
if progress:
|
||||
docs = tqdm(Document.objects.all())
|
||||
else:
|
||||
docs = Document.objects.all()
|
||||
|
||||
for doc in docs:
|
||||
for doc in tqdm(Document.objects.all(), disable=not progress):
|
||||
# Check sanity of the thumbnail
|
||||
if not os.path.isfile(doc.thumbnail_path):
|
||||
messages.error(f"Thumbnail of document {doc.pk} does not exist.")
|
||||
|
Reference in New Issue
Block a user