Skip to content

Commit

Permalink
extra being passed to SQLalchemy (#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.

(cherry picked from commit a856ed4)
  • Loading branch information
aritra24 authored and ephraimbuddy committed Jul 2, 2024
1 parent a8a47b0 commit 7d2f50b
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 @@ -4219,7 +4219,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 7d2f50b

Please sign in to comment.