From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 9 Apr 2025 09:12:42 +0000 (-0700) Subject: Fix: include matching check for scheduled workflows (#9594) X-Git-Tag: v2.15.1~1^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9f7428f2fc9d31bedef695de29742b53015bcee;p=thirdparty%2Fpaperless-ngx.git Fix: include matching check for scheduled workflows (#9594) --- diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index 073026b19..ae15992ed 100644 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -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}"