mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Frontend UI for redo OCR
This commit is contained in:
@@ -118,3 +118,10 @@ def delete(doc_ids):
|
||||
index.remove_document_by_id(writer, id)
|
||||
|
||||
return "OK"
|
||||
|
||||
|
||||
def redo_ocr(doc_ids):
|
||||
|
||||
async_task("documents.tasks.redo_ocr", document_ids=doc_ids)
|
||||
|
||||
return "OK"
|
||||
|
@@ -323,6 +323,7 @@ class BulkEditSerializer(DocumentListSerializer):
|
||||
"remove_tag",
|
||||
"modify_tags",
|
||||
"delete",
|
||||
"redo_ocr",
|
||||
],
|
||||
label="Method",
|
||||
write_only=True,
|
||||
@@ -356,6 +357,8 @@ class BulkEditSerializer(DocumentListSerializer):
|
||||
return bulk_edit.modify_tags
|
||||
elif method == "delete":
|
||||
return bulk_edit.delete
|
||||
elif method == "redo_ocr":
|
||||
return bulk_edit.redo_ocr
|
||||
else:
|
||||
raise serializers.ValidationError("Unsupported method.")
|
||||
|
||||
|
Reference in New Issue
Block a user