benjreinhart commented on a change in pull request #14702:
URL: https://github.com/apache/superset/pull/14702#discussion_r636494878
##########
File path: superset/utils/async_query_manager.py
##########
@@ -115,7 +117,13 @@ def init_app(self, app: Flask) -> None:
def validate_session( # pylint: disable=unused-variable
response: Response,
) -> Response:
- user_id = session["user_id"] if "user_id" in session else None
+ user_id = None
+
+ try:
+ user_id = g.user.get_id()
+ user_id = int(user_id)
Review comment:
Right, I changed the `except` statement to catch `exception` for this
reason (and to be extra careful, given that this is run for all requests). I
can switch to conditions if you'd prefer.
--
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]