Fix: only check workflow trigger source if not empty (#5701)

This commit is contained in:
shamoon authored and GitHub committed 2024-02-09 08:57:09 -08:00
1 parent 6587470033
commit 4855f4b8b1
3 files changed
+3 -56

No files matched your search

-3
View File
@@ -1410,9 +1410,6 @@ class WorkflowTriggerSerializer(serializers.ModelSerializer):
]
def validate(self, attrs):
if ("filter_mailrule") in attrs and attrs["filter_mailrule"] is not None:
attrs["sources"] = {DocumentSource.MailFetch.value}
# Empty strings treated as None to avoid unexpected behavior
if (
"filter_filename" in attrs