villebro commented on a change in pull request #14742:
URL: https://github.com/apache/superset/pull/14742#discussion_r636696335



##########
File path: superset/tasks/async_queries.py
##########
@@ -43,6 +43,8 @@ def ensure_user_is_set(user_id: Optional[int]) -> None:
     user_is_set = hasattr(g, "user") and g.user is not None
     if not user_is_set and user_id is not None:
         g.user = security_manager.get_user_by_id(user_id)
+    else:
+        g.user = security_manager.get_anonymous_user()

Review comment:
       Wouldn't this set `g.user` to anonymous if `user_is_set`? It appears we 
should make this `elif not user_is_set:`?




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



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

Reply via email to