You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/04/30 17:17:31 UTC
(airflow) branch v3-0-test updated: [v3-0-test] fix edit connection (#49989) (#50024)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-0-test by this push:
new 5f550153e0d [v3-0-test] fix edit connection (#49989) (#50024)
5f550153e0d is described below
commit 5f550153e0dd8cfeec7282966daaa082e3bffe83
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Wed Apr 30 19:17:25 2025 +0200
[v3-0-test] fix edit connection (#49989) (#50024)
(cherry picked from commit b5974c64d43dfb8837c3d1efb885b5f88f131d9a)
Co-authored-by: Shubham Raj <48...@users.noreply.github.com>
---
.../src/airflow/ui/src/pages/Connections/EditConnectionButton.tsx | 2 +-
airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/ui/src/pages/Connections/EditConnectionButton.tsx b/airflow-core/src/airflow/ui/src/pages/Connections/EditConnectionButton.tsx
index 07b0f5a98d5..33ce9832b9a 100644
--- a/airflow-core/src/airflow/ui/src/pages/Connections/EditConnectionButton.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Connections/EditConnectionButton.tsx
@@ -38,7 +38,7 @@ const EditConnectionButton = ({ connection, disabled }: Props) => {
conn_type: connection.conn_type,
connection_id: connection.connection_id,
description: connection.description ?? "",
- extra: connection.extra ?? "{}",
+ extra: connection.extra === "" || connection.extra === null ? "{}" : connection.extra,
host: connection.host ?? "",
login: connection.login ?? "",
password: connection.password ?? "",
diff --git a/airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx b/airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx
index 86225053a60..6f7face3a32 100644
--- a/airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx
+++ b/airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx
@@ -91,6 +91,7 @@ export const useEditConnection = (
...requestBody,
conn_type: requestBody.conn_type,
connection_id: initialConnection.connection_id,
+ extra: requestBody.extra === "{}" ? undefined : requestBody.extra,
// eslint-disable-next-line unicorn/no-null
port: requestBody.port === "" ? null : Number(requestBody.port),
},