Skip to content

Commit 7162407

Browse files
authored
Merge pull request #277 from networktocode/validate_empty_circuits-refinement
refactor: `validate_empty_circuits` using enums
2 parents ac4417e + 8f3d316 commit 7162407

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"]) not in ("Status.CANCELLED", "Status.COMPLETED"):
200+
if len(value) < 1 and 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)