kaxil closed pull request #4037: [AIRFLOW-3191] Fix not being able to specify 
execution_date when creating dagrun
URL: https://github.com/apache/airflow/pull/4037
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/www/views.py b/airflow/www/views.py
index 0aef2281e7..e696feab15 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -2677,9 +2677,18 @@ class DagRunModelView(ModelViewOnly):
             ('failed', 'failed'),
         ],
     }
-    form_args = dict(
-        dag_id=dict(validators=[validators.DataRequired()])
-    )
+    form_args = {
+        'dag_id': {
+            'validators': [
+                validators.DataRequired(),
+            ]
+        },
+        'execution_date': {
+            'filters': [
+                parse_datetime_f,
+            ]
+        }
+    }
     column_list = (
         'state', 'dag_id', 'execution_date', 'run_id', 'external_trigger')
     column_filters = column_list
@@ -2692,6 +2701,7 @@ class DagRunModelView(ModelViewOnly):
         dag_id=dag_link,
         run_id=dag_run_link
     )
+    form_overrides = dict(execution_date=DateTimeField)
 
     @action('new_delete', "Delete", "Are you sure you want to delete selected 
records?")
     @provide_session


 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to