mistercrunch commented on a change in pull request #8289: react menu
URL: 
https://github.com/apache/incubator-superset/pull/8289#discussion_r331752076
 
 

 ##########
 File path: superset/views/base.py
 ##########
 @@ -170,16 +170,61 @@ def json_response(self, obj, status=200):
             mimetype="application/json",
         )
 
+    def menu_data(self):
+        menu = appbuilder.menu.get_data()
+        root_path = "#"
+        if not g.user.is_anonymous:
+            try:
+                logo_target_path = appbuilder.app.config.get(
+                    "LOGO_TARGET_PATH"
+                ) or "/profile/{}/".format(g.user.username)
+                if logo_target_path.startswith("/"):
+                    root_path = "/superset{}".format(logo_target_path)
+                else:
+                    root_path = logo_target_path
+            except NameError as e:
 
 Review comment:
   Which line is likely to raise a `NameError`? Can we target 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to