dstandish commented on code in PR #27609:
URL: https://github.com/apache/airflow/pull/27609#discussion_r1019704261


##########
airflow/models/taskinstance.py:
##########
@@ -2573,10 +2573,9 @@ def __eq__(self, other):
     def as_dict(self):
         new_dict = dict(self.__dict__)
         for key in ["start_date", "end_date"]:
-            val = new_dict[key]
-            if not val or isinstance(val, str):
-                continue
-            new_dict[key] = val.isoformat()
+            val = new_dict.get(key)
+            if hasattr(val, "isoformat"):

Review Comment:
   We'll, maybe all of our date times inherit from that? If so it'd be fine. 
But if not we might miss stringifying it is the only thing 



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to