mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-30 23:08:59 -06:00
Enhancement: support doc_id placeholder in workflow templates (#11847)
This commit is contained in:
@@ -44,6 +44,7 @@ def build_workflow_action_context(
|
||||
"current_filename": document.filename or "",
|
||||
"added": timezone.localtime(document.added),
|
||||
"created": document.created,
|
||||
"id": document.pk,
|
||||
}
|
||||
|
||||
correspondent_obj = (
|
||||
@@ -75,6 +76,7 @@ def build_workflow_action_context(
|
||||
"current_filename": filename,
|
||||
"added": timezone.localtime(timezone.now()),
|
||||
"created": overrides.created if overrides else None,
|
||||
"id": "",
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +111,7 @@ def execute_email_action(
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
if action.email.subject
|
||||
else ""
|
||||
@@ -125,6 +128,7 @@ def execute_email_action(
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
if action.email.body
|
||||
else ""
|
||||
@@ -203,6 +207,7 @@ def execute_webhook_action(
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
@@ -221,6 +226,7 @@ def execute_webhook_action(
|
||||
context["created"],
|
||||
context["title"],
|
||||
context["doc_url"],
|
||||
context["id"],
|
||||
)
|
||||
headers = {}
|
||||
if action.webhook.headers:
|
||||
|
||||
Reference in New Issue
Block a user