uranusjr commented on code in PR #29946:
URL: https://github.com/apache/airflow/pull/29946#discussion_r1127360432


##########
airflow/www/views.py:
##########
@@ -4512,17 +4507,14 @@ def process_form(self, form, is_created):
                 del form.extra
         del extra_json
 
-        for key in self.extra_fields:
+        for key, field_name in form.extra_field_name_mapping.items():

Review Comment:
   `extra_fields` is removed since it is simply 
`extra_field_name_mapping.keys()`, but since Python 3.7 the dict maintains 
ordering on its own the extra list is not needed anymore.
   
   `extra_field_name_mapping` is delibrately moved to ConnectionForm since 
Flask-Appbuilder has some annoying introspecting mechanism that tries to 
resolve values on the view class too eagerly. Moving the property to the form 
class ensures it is only calculated when needed.



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

Reply via email to