mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
Add --no-progress-bar option to commands
This commit is contained in:
parent
17b9d7eb42
commit
dc26c9b7cc
10 changed files with 83 additions and 21 deletions
|
|
@ -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.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue