You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by er...@apache.org on 2020/02/20 21:19:23 UTC

[incubator-superset] branch erik-ritter--sqllab-querysource created (now f8d4ee9)

This is an automated email from the ASF dual-hosted git repository.

erikrit pushed a change to branch erik-ritter--sqllab-querysource
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


      at f8d4ee9  Infer SQL_LAB QuerySource from referrer

This branch includes the following new commits:

     new f8d4ee9  Infer SQL_LAB QuerySource from referrer

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-superset] 01/01: Infer SQL_LAB QuerySource from referrer

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

erikrit pushed a commit to branch erik-ritter--sqllab-querysource
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit f8d4ee95fbfb180015647f66d29085caae5ece15
Author: Erik Ritter <er...@airbnb.com>
AuthorDate: Thu Feb 20 13:19:04 2020 -0800

    Infer SQL_LAB QuerySource from referrer
---
 superset/models/core.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/superset/models/core.py b/superset/models/core.py
index 769250f..eee8550 100755
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -319,6 +319,8 @@ class Database(
                     source = utils.QuerySource.DASHBOARD
                 elif "/superset/explore/" in request.referrer:
                     source = utils.QuerySource.CHART
+                elif "/superset/sqllab/" in request.referrer:
+                    source = utils.QuerySource.SQL_LAB
 
             sqlalchemy_url, params = DB_CONNECTION_MUTATOR(
                 sqlalchemy_url, params, effective_username, security_manager, source