diff --git a/workflows_api/runtime/src/schema_helpers.py b/workflows_api/runtime/src/schema_helpers.py index 35544ff4..f1d4a351 100644 --- a/workflows_api/runtime/src/schema_helpers.py +++ b/workflows_api/runtime/src/schema_helpers.py @@ -43,7 +43,7 @@ class TemporalExtent(BaseModel): startdate: datetime enddate: datetime - @root_validator + @root_validator(pre=True) def check_dates(cls, v): if v["startdate"] >= v["enddate"]: raise ValueError("Invalid extent - startdate must be before enddate")