mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-01 18:37:42 -05:00
move the two post bulk edit tasks into one
This commit is contained in:
@@ -90,16 +90,11 @@ def sanity_check():
|
||||
return "No issues detected."
|
||||
|
||||
|
||||
def bulk_rename_files(document_ids):
|
||||
qs = Document.objects.filter(id__in=document_ids)
|
||||
for doc in qs:
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
|
||||
|
||||
def bulk_index_documents(document_ids):
|
||||
def bulk_update_documents(document_ids):
|
||||
documents = Document.objects.filter(id__in=document_ids)
|
||||
|
||||
ix = index.open_index()
|
||||
with AsyncWriter(ix) as writer:
|
||||
for doc in documents:
|
||||
index.update_document(writer, doc)
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
|
Reference in New Issue
Block a user