diff --git a/circuit_maintenance_parser/output.py b/circuit_maintenance_parser/output.py index 0be025ac..a2f862de 100644 --- a/circuit_maintenance_parser/output.py +++ b/circuit_maintenance_parser/output.py @@ -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