Fix: only check workflow source if not empty
This commit is contained in:
parent
6587470033
commit
743ba38f93
@ -258,7 +258,9 @@ def consumable_document_matches_workflow(
|
|||||||
reason = ""
|
reason = ""
|
||||||
|
|
||||||
# Document source vs trigger source
|
# Document source vs trigger source
|
||||||
if document.source not in [int(x) for x in list(trigger.sources)]:
|
if len(trigger.sources) > 0 and document.source not in [
|
||||||
|
int(x) for x in list(trigger.sources)
|
||||||
|
]:
|
||||||
reason = (
|
reason = (
|
||||||
f"Document source {document.source.name} not in"
|
f"Document source {document.source.name} not in"
|
||||||
f" {[DocumentSource(int(x)).name for x in trigger.sources]}",
|
f" {[DocumentSource(int(x)).name for x in trigger.sources]}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user