Skip to content

Commit

Permalink
extra being passed to SQLalchemy (apache#40391)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aritra24 authored and romsharon98 committed Jul 26, 2024
1 parent f5a6e6a commit 5cb2502
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4408,7 +4408,10 @@ def prefill_form(self, form, pk):
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):
Expand Down

0 comments on commit 5cb2502

Please sign in to comment.