dstandish commented on a change in pull request #12910:
URL: https://github.com/apache/airflow/pull/12910#discussion_r538858979
##########
File path: airflow/models/taskinstance.py
##########
@@ -773,7 +773,7 @@ def get_previous_start_date(
"""
self.log.debug("previous_start_date was called")
prev_ti = self.get_previous_ti(state=state, session=session)
- return prev_ti and prev_ti.start_date
+ return prev_ti and prev_ti.start_date and
pendulum.instance(prev_ti.start_date)
Review comment:
yes this or
```
if prev_ti and prev_ti.start_date: # my preference, i guess
return pendulum.instance(prev_ti.start_date)
```
or
```
if prev_ti and prev_ti.start_date is not None:
return pendulum.instance(prev_ti.start_date)
```
All fine with me. Will wait for guidance on changing test vs changing code.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]