unsigned-long-int commented on code in PR #59530:
URL: https://github.com/apache/airflow/pull/59530#discussion_r2684025302
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2002,7 +2002,10 @@ def _deserialize_field_value(cls, field_name: str,
value: Any) -> Any:
elif field_name == "resources":
return Resources.from_dict(value) if value is not None else None
elif field_name.endswith("_date"):
- return cls._deserialize_datetime(value) if value is not None else
None
+ # type security first: _deserialize_datetime expects numeric for
serialization
+ if isinstance(value, (int, float)) and not isinstance(value, bool):
Review Comment:
Hi @uranusjr , `from_date="{{ macros.ds_add(ds, -7) }}"` is just a
primitive, whose type is string. This is hence serialized as simple string.
However during **deserialization**, everything ending with `*_date` is assumed
to be float - that's why deserialization fails.
--
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]