kaxil commented on a change in pull request #4359: [AIRFLOW-3150] Make 
execution_date templated in TriggerDagRunOperator
URL: https://github.com/apache/incubator-airflow/pull/4359#discussion_r243753086
 
 

 ##########
 File path: airflow/operators/dagrun_operator.py
 ##########
 @@ -64,10 +66,26 @@ def __init__(
         super(TriggerDagRunOperator, self).__init__(*args, **kwargs)
         self.python_callable = python_callable
         self.trigger_dag_id = trigger_dag_id
-        self.execution_date = execution_date
+
+        if isinstance(execution_date, datetime.datetime):
+            self.execution_date = execution_date.isoformat()
+        elif isinstance(execution_date, six.string_types):
+            self.execution_date = execution_date
+        elif execution_date is None:
+            self.execution_date = execution_date
 
 Review comment:
   No, it is the default value as well and will also break backwards 
compatiblility.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to