amoghrajesh commented on code in PR #48969:
URL: https://github.com/apache/airflow/pull/48969#discussion_r2034477878
##########
providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:
##########
@@ -190,10 +190,12 @@ def __init__(
self.logical_date = logical_date
def execute(self, context: Context):
- if self.logical_date is None or isinstance(self.logical_date,
datetime.datetime):
+ if isinstance(self.logical_date, datetime.datetime):
parsed_logical_date = self.logical_date
- else:
+ elif isinstance(self.logical_date, str):
parsed_logical_date = timezone.parse(self.logical_date)
+ else:
+ parsed_logical_date = timezone.utcnow()
Review Comment:
Can we please add a comment why we do this?
--
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]