mik-laj commented on a change in pull request #10987:
URL: https://github.com/apache/airflow/pull/10987#discussion_r509670185



##########
File path: airflow/www/extensions/init_views.py
##########
@@ -73,8 +73,12 @@ def init_plugins(app):
     appbuilder = app.appbuilder
 
     for view in plugins_manager.flask_appbuilder_views:
-        log.debug("Adding view %s", view["name"])
-        appbuilder.add_view(view["view"], view["name"], 
category=view["category"])
+        try:
+            log.debug("Adding view %s with menu", view["name"])
+            appbuilder.add_view(view["view"], view["name"], 
category=view["category"])
+        except KeyError:

Review comment:
       This is not very important, but I would prefer the intent of the code to 
be clearly stated. This makes it easier to maintain the code in the long run 
because you don't have to think about what a particular piece of code is doing.
   
   I could ignore it if the change had tests and documentation.Now I am asking 
you to make these changes, add missing tests and documentation.  I would very 
much like this change to be completed, but as an OSS project, we also need to 
keep this code easy to maintain in the long term.




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