potiuk commented on code in PR #33837:
URL: https://github.com/apache/airflow/pull/33837#discussion_r1314289102
##########
airflow/models/taskinstance.py:
##########
@@ -2966,12 +2966,9 @@ def as_dict(self):
stacklevel=2,
)
new_dict = dict(self.__dict__)
- for key in new_dict:
- if key in ["start_date", "end_date"]:
- val = new_dict[key]
- if not val or isinstance(val, str):
- continue
- new_dict.update({key: val.isoformat()})
+ for key, val in new_dict.items():
+ if key in ["start_date", "end_date"] and isinstance(val, datetime):
Review Comment:
I think this is not exactly the same. We can have pendulum datetime here as
well.
--
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]