From 5cd4b84b106a9bfdfe0061c56e3484981081a760 Mon Sep 17 00:00:00 2001 From: Ash Berlin-Taylor Date: Fri, 28 May 2021 13:34:19 +0100 Subject: [PATCH] Apply suggestions from code review --- airflow/cli/commands/connection_command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow/cli/commands/connection_command.py b/airflow/cli/commands/connection_command.py index 6245cca9e024e..b6f9d9764dbaa 100644 --- a/airflow/cli/commands/connection_command.py +++ b/airflow/cli/commands/connection_command.py @@ -254,8 +254,10 @@ def _import_helper(file_path): print(f'Could not import connection {conn_id}: connection already exists.') continue + if "extra_dejson" in conn_dict: + conn_dict["extra"] = conn_dict.pop("extra_dejson") # Add the connection to the DB - connection = Connection(conn_id, **dict(conn_dict.items())) + connection = Connection(conn_id, **conn_dict) session.add(connection) session.commit() print(f'Imported connection {conn_id}')