kaxil commented on code in PR #45030:
URL: https://github.com/apache/airflow/pull/45030#discussion_r1890205343
##########
airflow/api_fastapi/execution_api/datamodels/taskinstance.py:
##########
@@ -83,6 +83,15 @@ class TIDeferredStatePayload(BaseModel):
next_method: str
trigger_timeout: timedelta | None = None
+ @field_validator("trigger_kwargs", mode="before")
+ def validate_moment(cls, v):
+ from datetime import datetime
+
+ if "moment" in v and isinstance(v["moment"], str):
+ moment = datetime.fromisoformat(v["moment"].replace("Z", "+00:00"))
+ v["moment"] = moment
+ return v
Review Comment:
I am surprised we need this, string should be converted to datetime by
Pydantic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]