You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/21 15:49:42 UTC

[GitHub] [incubator-superset] bkyryliuk commented on a change in pull request #10938: fix: use nullpool even for user lookup in the celery

bkyryliuk commented on a change in pull request #10938:
URL: https://github.com/apache/incubator-superset/pull/10938#discussion_r492166971



##########
File path: superset/tasks/schedules.py
##########
@@ -200,12 +201,21 @@ def _get_url_path(view: str, user_friendly: bool = False, **kwargs: Any) -> str:
         return urllib.parse.urljoin(str(base_url), url_for(view, **kwargs))
 
 
-def create_webdriver() -> WebDriver:
-    return WebDriverProxy(driver_type=config["WEBDRIVER_TYPE"]).auth(get_reports_user())
+def create_webdriver(session: Session) -> WebDriver:
+    return WebDriverProxy(driver_type=config["WEBDRIVER_TYPE"]).auth(
+        get_reports_user(session)
+    )
 
 
-def get_reports_user() -> "User":
-    return security_manager.find_user(config["EMAIL_REPORTS_USER"])
+def get_reports_user(session: Session) -> "User":
+    return (
+        session.query(security_manager.user_model)
+        .filter(
+            func.lower(security_manager.user_model.username)
+            == func.lower(config["EMAIL_REPORTS_USER"])

Review comment:
       ah, this is from security manager implementation, wanted them to be aligned, email is case insensitive 




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org