Skip to content

Commit

Permalink
fixup! chop one more line
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Nov 15, 2022
1 parent 12cdc6d commit 1598796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/models/taskinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import signal
import warnings
from collections import defaultdict
from datetime import datetime, timedelta
from datetime import date, datetime, timedelta
from functools import partial
from types import TracebackType
from typing import TYPE_CHECKING, Any, Callable, Collection, Generator, Iterable, NamedTuple, Tuple
Expand Down Expand Up @@ -2574,7 +2574,7 @@ def as_dict(self):
new_dict = dict(self.__dict__)
for key in ["start_date", "end_date"]:
val = new_dict.get(key)
if hasattr(val, "isoformat"):
if isinstance(val, date):
new_dict[key] = val.isoformat()
executor_config = new_dict["executor_config"]
new_dict["executor_config"] = ExecutorConfigType.serialize_pod_override(executor_config)
Expand Down

0 comments on commit 1598796

Please sign in to comment.