This is an automated email from the ASF dual-hosted git repository. utkarsharma pushed a commit to branch v2-9-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 139ecb04dfbd9b942bc0ce5332996b70ed834b9a Author: Aritra Basu <[email protected]> AuthorDate: Thu Jun 27 09:13:42 2024 +0530 extra being passed to SQLalchemy (#40391) The edit prefills an empty extra field (None) with a empty dictionary, which is decoded to an extra field being passed in the con url. (cherry picked from commit a856ed4fb04352798664e79b9ff32b9f375b1d75) --- airflow/www/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airflow/www/views.py b/airflow/www/views.py index 2a17a9de47..3faed00a38 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -4219,7 +4219,10 @@ class ConnectionModelView(AirflowModelView): if is_sensitive and field_name in extra_dictionary: extra_dictionary[field_name] = SENSITIVE_FIELD_PLACEHOLDER # form.data is a property that builds the dictionary from fields so we have to modify the fields - form.extra.data = json.dumps(extra_dictionary) + if extra_dictionary: + form.extra.data = json.dumps(extra_dictionary) + else: + form.extra.data = None class PluginView(AirflowBaseView):
