mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:20:43 +01:00
Improve docstring
This commit is contained in:
@@ -679,12 +679,14 @@ def run_workflows(
|
|||||||
original_file: Path | None = None,
|
original_file: Path | None = None,
|
||||||
) -> tuple[DocumentMetadataOverrides, str] | None:
|
) -> tuple[DocumentMetadataOverrides, str] | None:
|
||||||
"""
|
"""
|
||||||
Run workflows which match a Document (or ConsumableDocument) for a specific trigger type or a single workflow if given.
|
Execute workflows matching a document for the given trigger. When `overrides` is provided
|
||||||
|
(consumption flow), actions mutate that object and the function returns `(overrides, messages)`.
|
||||||
|
Otherwise actions mutate the actual document and return nothing.
|
||||||
|
|
||||||
Assignment or removal actions are either applied directly to the document or an overrides object. If an overrides
|
Attachments for email/webhook actions use `original_file` when given, otherwise fall back to
|
||||||
object is provided, the function returns the object with the applied changes or None if no actions were applied and a string
|
`document.source_path` (Document) or `document.original_file` (ConsumableDocument).
|
||||||
of messages for each action. If no overrides object is provided, the changes are applied directly to the document and the
|
|
||||||
function returns None.
|
Passing `workflow_to_run` skips the workflow query (currently only used by scheduled runs).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
use_overrides = overrides is not None
|
use_overrides = overrides is not None
|
||||||
|
|||||||
Reference in New Issue
Block a user