From 82007dc1677b6f4f1341ccd7660e68cbf0661289 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Mon, 5 Jul 2021 15:03:37 +0200 Subject: [PATCH] Fixed DAG triggering with parameters There was a bad cherry-pick when merging #15057 that has not been caught because of quarantined test. Fixes: #16810 --- airflow/www/views.py | 2 +- tests/www/views/test_views_trigger_dag.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/airflow/www/views.py b/airflow/www/views.py index 63f232a255ffc..fdfea4228246c 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -1523,7 +1523,7 @@ def trigger(self, session=None): if request_conf: try: run_conf = json.loads(request_conf) - if not isinstance(conf, dict): + if not isinstance(run_conf, dict): flash("Invalid JSON configuration, must be a dict", "error") return self.render_template( 'airflow/trigger.html', dag_id=dag_id, origin=origin, conf=request_conf diff --git a/tests/www/views/test_views_trigger_dag.py b/tests/www/views/test_views_trigger_dag.py index b36f89189eeaf..e1ead4d2f9aa5 100644 --- a/tests/www/views/test_views_trigger_dag.py +++ b/tests/www/views/test_views_trigger_dag.py @@ -52,7 +52,6 @@ def test_trigger_dag_button(admin_client): assert run.run_type == DagRunType.MANUAL -@pytest.mark.quarantined def test_trigger_dag_conf(admin_client): test_dag_id = "example_bash_operator" conf_dict = {'string': 'Hello, World!'}