Skip to content

Commit

Permalink
Correct incorrect logic in validation code (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaslak authored Mar 18, 2024
1 parent 956c049 commit ac4417e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion circuit_maintenance_parser/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def validate_empty_strings(cls, value):
def validate_empty_circuits(cls, value, values):
"""Validate non-cancel notifications have a populated circuit list."""
values = values.data
if len(value) < 1 and str(values["status"]) in ("CANCELLED", "COMPLETED"):
if len(value) < 1 and str(values["status"]) not in ("Status.CANCELLED", "Status.COMPLETED"):
raise ValueError("At least one circuit has to be included in the maintenance")
return value

Expand Down

0 comments on commit ac4417e

Please sign in to comment.