Skip to content

Commit ac4417e

Browse files
authored
Correct incorrect logic in validation code (#272)
1 parent 956c049 commit ac4417e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

circuit_maintenance_parser/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def validate_empty_strings(cls, value):
197197
def validate_empty_circuits(cls, value, values):
198198
"""Validate non-cancel notifications have a populated circuit list."""
199199
values = values.data
200-
if len(value) < 1 and str(values["status"]) in ("CANCELLED", "COMPLETED"):
200+
if len(value) < 1 and str(values["status"]) not in ("Status.CANCELLED", "Status.COMPLETED"):
201201
raise ValueError("At least one circuit has to be included in the maintenance")
202202
return value
203203

0 commit comments

Comments
 (0)