unsigned-long-int commented on code in PR #59530:
URL: https://github.com/apache/airflow/pull/59530#discussion_r2662274729


##########
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:
   hey @uranusjr,  thanks for your message. As mentioned in the issue, this is 
the case with template fields which stay as strings. When trying to 
**deserialize**, it is assumed to deserialize `*_date` fields as `numeric`, 
causing parsing error. 



-- 
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]

Reply via email to