Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ashb committed Jun 10, 2021
1 parent a60a1f3 commit 5cd4b84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/cli/commands/connection_command.py
Expand Up @@ -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}')

0 comments on commit 5cd4b84

Please sign in to comment.