airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] wrp commented on a change in pull request #3785: [AIRFLOW-2938] Handle improperly formatted extra field in connection …
Date Thu, 23 Aug 2018 15:54:01 GMT
wrp commented on a change in pull request #3785: [AIRFLOW-2938] Handle improperly formatted
extra field in connection …
URL: https://github.com/apache/incubator-airflow/pull/3785#discussion_r212363527
 
 

 ##########
 File path: airflow/www_rbac/views.py
 ##########
 @@ -1923,7 +1923,10 @@ def prefill_form(self, form, pk):
             d = {}
 
         for field in self.extra_fields:
-            value = d.get(field, '')
+            try:
+                value = d.get(field, '')
+            except Exception:
 
 Review comment:
   The extra field is user generated, so must be treated with care.  The particular problem
I'm seeing is when it is the string "null", and then clicking on the edit button fails.  I've
just added a logging.warning, but it's not clear to me if the message is accurate since this
code path is probably used with forms that do not have a 'conn_id' field....but an ambiguous
warning message may be better than the current user experience.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message