ashb commented on a change in pull request #7312: [AIRFLOW-6695] Add DAG run 
configuration to UI
URL: https://github.com/apache/airflow/pull/7312#discussion_r375754969
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -994,6 +1003,13 @@ def trigger(self, session=None):
             return redirect(origin)
 
         run_conf = {}
+        conf = request.values.get('conf')
+        if conf:
+            try:
+                run_conf = json.loads(conf)
+            except json.decoder.JSONDecodeError:
+                flash("Invalid JSON configuration")
+                return redirect(url_for('Airflow.trigger', dag_id=dag_id))
 
 Review comment:
   Rather than redirecting it would be better to just display the form again -- 
that input will be re-shown, and origin param preserved etc.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to