This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new bf2f633a554 [v3-1-test] fix(api_fastapi): adjust model validator
signature of TriggerDAGRunPostBody (#56025) (#56026) (#56256)
bf2f633a554 is described below
commit bf2f633a554c9afc5f19e7af0a0866fc4e1db6b9
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Oct 1 12:07:04 2025 +0200
[v3-1-test] fix(api_fastapi): adjust model validator signature of
TriggerDAGRunPostBody (#56025) (#56026) (#56256)
(cherry picked from commit bfb7ecbb7091caf862b283f39b07170f34d056cb)
Co-authored-by: Daniel Gellert <[email protected]>
Co-authored-by: Daniel Gellert <[email protected]>
---
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py
b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py
index ed7aac2ae00..5764a144149 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/datamodels/dag_run.py
@@ -106,12 +106,12 @@ class TriggerDAGRunPostBody(StrictBaseModel):
note: str | None = None
@model_validator(mode="after")
- def check_data_intervals(cls, values):
- if (values.data_interval_start is None) != (values.data_interval_end
is None):
+ def check_data_intervals(self):
+ if (self.data_interval_start is None) != (self.data_interval_end is
None):
raise ValueError(
"Either both data_interval_start and data_interval_end must be
provided or both must be None"
)
- return values
+ return self
def validate_context(self, dag: SerializedDAG) -> dict:
coerced_logical_date = timezone.coerce_datetime(self.logical_date)