Skip to content

Commit

Permalink
send username in sync request (apache#6113)
Browse files Browse the repository at this point in the history
* send username in sync request

* nit
  • Loading branch information
youngyjd authored and mistercrunch committed Oct 16, 2018
1 parent 316fdcb commit 91792a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2533,7 +2533,7 @@ def sql_json(self):
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)
Expand Down Expand Up @@ -2565,7 +2565,8 @@ def sql_json(self):
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,
Expand Down

0 comments on commit 91792a5

Please sign in to comment.