]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: include matching check for scheduled workflows (#9594)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Wed, 9 Apr 2025 09:12:42 +0000 (02:12 -0700)
committerGitHub <noreply@github.com>
Wed, 9 Apr 2025 09:12:42 +0000 (02:12 -0700)
src/documents/signals/handlers.py

index 073026b192a28350b6dc50c8775e9cf4e01702b0..ae15992ed10ed4cd7faab23c37d3170c3c48ebb3 100644 (file)
@@ -1225,14 +1225,7 @@ def run_workflows(
             document.refresh_from_db()
             doc_tag_ids = list(document.tags.values_list("pk", flat=True))
 
-        # If a workflow is supplied, we don't need to check if it matches
-        matches = (
-            matching.document_matches_workflow(document, workflow, trigger_type)
-            if workflow_to_run is None
-            else True
-        )
-
-        if matches:
+        if matching.document_matches_workflow(document, workflow, trigger_type):
             action: WorkflowAction
             for action in workflow.actions.all():
                 message = f"Applying {action} from {workflow}"