potiuk commented on a change in pull request #10498:
URL: https://github.com/apache/airflow/pull/10498#discussion_r475795588



##########
File path: airflow/www/views.py
##########
@@ -2329,28 +2411,29 @@ def process_form(self, form, is_created):
             form.extra.data = json.dumps(extra)
 
     def prefill_form(self, form, pk):
+        """Prefill the form."""
         try:
-            d = json.loads(form.data.get('extra', '{}'))
+            extra_dictionary = json.loads(form.data.get('extra', '{}'))
         except JSONDecodeError:
-            d = {}
+            extra_dictionary = {}
 
-        if not hasattr(d, 'get'):
-            logging.warning('extra field for {} is not iterable'.format(
-                form.data.get('conn_id', '<unknown>')))
+        if not hasattr(extra_dictionary, 'get'):

Review comment:
       Actually it was even worse - because the error message was wrong (it was 
telling about the extra not being iterable.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to