aritra24 commented on code in PR #40391:
URL: https://github.com/apache/airflow/pull/40391#discussion_r1650375581
##########
airflow/www/views.py:
##########
@@ -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.keys():
+ form.extra.data = json.dumps(extra_dictionary)
+ else:
+ form.extra.data = None
Review Comment:
I didn't check, but my understanding is if there was a non dictionary value
in the data field it would remain as that (since we don't unset it on error)
and we don't want that, which is why we explicitly unset it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]