feluelle commented on a change in pull request #9512:
URL: https://github.com/apache/airflow/pull/9512#discussion_r445504606
##########
File path: airflow/models/taskinstance.py
##########
@@ -930,6 +930,12 @@ def check_and_change_state_before_execution(
self.log.info("Executing %s on %s", self.task,
self.execution_date)
return True
+ def _date_or_empty(self, attr):
+ if hasattr(self, attr):
+ date = getattr(self, attr)
+ return date.strftime('%Y%m%dT%H%M%S') if date else ''
Review comment:
```suggestion
if date:
return date.strftime('%Y%m%dT%H%M%S')
```
----------------------------------------------------------------
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]