mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-11 10:37:12 +00:00
Fix: better catch email workflow placeholder parsing errors (#14129)
This commit is contained in:
1 parent
f919c981e1
commit
e8b7a98d3e
2 files changed
+95
-35
No files matched your search
@@ -102,42 +102,42 @@ def execute_email_action(
|
||||
)
|
||||
return
|
||||
|
||||
subject = (
|
||||
parse_w_workflow_placeholders(
|
||||
action.email.subject,
|
||||
context["correspondent"],
|
||||
context["document_type"],
|
||||
context["owner_username"],
|
||||
context["added"],
|
||||
context["filename"],
|
||||
context["current_filename"],
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
if action.email.subject
|
||||
else ""
|
||||
)
|
||||
body = (
|
||||
parse_w_workflow_placeholders(
|
||||
action.email.body,
|
||||
context["correspondent"],
|
||||
context["document_type"],
|
||||
context["owner_username"],
|
||||
context["added"],
|
||||
context["filename"],
|
||||
context["current_filename"],
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
if action.email.body
|
||||
else ""
|
||||
)
|
||||
|
||||
try:
|
||||
subject = (
|
||||
parse_w_workflow_placeholders(
|
||||
action.email.subject,
|
||||
context["correspondent"],
|
||||
context["document_type"],
|
||||
context["owner_username"],
|
||||
context["added"],
|
||||
context["filename"],
|
||||
context["current_filename"],
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
if action.email.subject
|
||||
else ""
|
||||
)
|
||||
body = (
|
||||
parse_w_workflow_placeholders(
|
||||
action.email.body,
|
||||
context["correspondent"],
|
||||
context["document_type"],
|
||||
context["owner_username"],
|
||||
context["added"],
|
||||
context["filename"],
|
||||
context["current_filename"],
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
if action.email.body
|
||||
else ""
|
||||
)
|
||||
|
||||
attachments: list[EmailAttachment] = []
|
||||
if action.email.include_document:
|
||||
attachment: EmailAttachment | None = None
|
||||
|
||||
Reference in new issue
Block a user