betodealmeida commented on code in PR #19999:
URL: https://github.com/apache/superset/pull/19999#discussion_r868314655
##########
superset/sql_lab.py:
##########
@@ -366,6 +388,9 @@ def execute_sql_statements( # pylint:
disable=too-many-arguments, too-many-loca
# only asynchronous queries
stats_logger.timing("sqllab.query.time_pending", now_as_float() -
start_time)
+ if not hasattr(g, "user"):
+ g.user = security_manager.find_user(username=user_name)
Review Comment:
SQL Lab doesn't have the `g.user` context, since it might run in Celery
workers.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]