Enhancement: support doc_id placeholder in workflow templates (#11847)

This commit is contained in:
shamoon
2026-01-21 16:05:19 -08:00
committed by GitHub
parent c06e1e7cba
commit 32b236cfa2
5 changed files with 18 additions and 2 deletions

View File

@@ -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: