From a5d3d51cc50de657e7f6fa235106f11ea259a721 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 23 Apr 2024 07:37:14 -0700 Subject: [PATCH] Fix: always check workflow filter_mailrule if set (#6474) --- src/documents/matching.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/documents/matching.py b/src/documents/matching.py index 6ffa1b3aa..586ca3a6a 100644 --- a/src/documents/matching.py +++ b/src/documents/matching.py @@ -269,8 +269,7 @@ def consumable_document_matches_workflow( # Document mail rule vs trigger mail rule if ( - document.mailrule_id is not None - and trigger.filter_mailrule is not None + trigger.filter_mailrule is not None and document.mailrule_id != trigger.filter_mailrule.pk ): reason = (