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

This commit is contained in:
shamoon
2024-02-09 08:57:09 -08:00
committed by GitHub
parent 6587470033
commit 4855f4b8b1
3 changed files with 3 additions and 56 deletions

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