Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: always check workflow filter_mailrule if set (#6474)

shamoona5d3d51cc50d
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 = (