mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 20:46:53 +00:00
Merge branch 'dev' into feature/ocr-templates
This commit is contained in:
163 files changed
+66973
-42649
No files matched your search
@@ -741,8 +741,9 @@ def run_workflows_for_documents(
|
||||
logger.warning(
|
||||
f"Manual workflow run requested for missing workflow {workflow_id}",
|
||||
)
|
||||
return
|
||||
raise
|
||||
|
||||
failed_ids = []
|
||||
for document in Document.objects.filter(
|
||||
id__in=document_ids,
|
||||
root_document__isnull=True,
|
||||
@@ -760,10 +761,16 @@ def run_workflows_for_documents(
|
||||
document=document,
|
||||
)
|
||||
except Exception:
|
||||
failed_ids.append(document.pk)
|
||||
logger.exception(
|
||||
f"Error running workflow {workflow} on document {document.pk}",
|
||||
)
|
||||
|
||||
if failed_ids:
|
||||
raise RuntimeError(
|
||||
f"Workflow {workflow_id} failed for document(s): {failed_ids}. Check logs for details.",
|
||||
)
|
||||
|
||||
|
||||
def update_document_parent_tags(tag: Tag, new_parent: Tag) -> None:
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user