mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-01 18:37:42 -05:00
add bulk editing methods
This commit is contained in:
@@ -2,6 +2,7 @@ import logging
|
||||
|
||||
import tqdm
|
||||
from django.conf import settings
|
||||
from django.db.models.signals import post_save
|
||||
from whoosh.writing import AsyncWriter
|
||||
|
||||
from documents import index, sanity_checker
|
||||
@@ -87,3 +88,9 @@ def sanity_check():
|
||||
raise SanityFailedError(messages)
|
||||
else:
|
||||
return "No issues detected."
|
||||
|
||||
|
||||
def bulk_rename_files(ids):
|
||||
qs = Document.objects.filter(id__in=ids)
|
||||
for doc in qs:
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
|
Reference in New Issue
Block a user