superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: send username in sync request (#6113)
Date Tue, 16 Oct 2018 03:34:06 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 91792a5  send username in sync request (#6113)
91792a5 is described below

commit 91792a564a9b29f560b234629c764ca455adeb07
Author: Junda Yang <youngyjd@gmail.com>
AuthorDate: Mon Oct 15 20:33:59 2018 -0700

    send username in sync request (#6113)
    
    * send username in sync request
    
    * nit
---
 superset/views/core.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index 05ef431..43f581e 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2533,7 +2533,7 @@ class Superset(BaseSupersetView):
                     rendered_query,
                     return_results=False,
                     store_results=not query.select_as_cta,
-                    user_name=g.user.username,
+                    user_name=g.user.username if g.user else None,
                     start_time=utils.now_as_float())
             except Exception as e:
                 logging.exception(e)
@@ -2565,7 +2565,8 @@ class Superset(BaseSupersetView):
                 data = sql_lab.get_sql_results(
                     query_id,
                     rendered_query,
-                    return_results=True)
+                    return_results=True,
+                    user_name=g.user.username if g.user else None)
             payload = json.dumps(
                 data,
                 default=utils.pessimistic_json_iso_dttm_ser,


Mime
View raw message