From ac4417e61786df751eb57620d250622c5f00833c Mon Sep 17 00:00:00 2001 From: Joelle Maslak Date: Sun, 17 Mar 2024 23:37:23 -0600 Subject: [PATCH] Correct incorrect logic in validation code (#272) --- circuit_maintenance_parser/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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