Skip to content

Commit

Permalink
Alternative fix for apache#7559
Browse files Browse the repository at this point in the history
Just an idea...
  • Loading branch information
mistercrunch committed May 31, 2019
1 parent 15d0361 commit e43dc45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def execute_sql_statements(
query.rows = cdf.size
query.progress = 100
query.set_extra_json_key('progress', None)
query.status = QueryStatus.SUCCESS
if query.select_as_cta:
query.select_sql = database.select_star(
query.tmp_table_name,
Expand All @@ -285,7 +284,7 @@ def execute_sql_statements(
selected_columns, data)

payload.update({
'status': query.status,
'status': QueryStatus.SUCCESS,
'data': data,
'columns': all_columns,
'selected_columns': selected_columns,
Expand All @@ -304,6 +303,8 @@ def execute_sql_statements(
cache_timeout = config.get('CACHE_DEFAULT_TIMEOUT', 0)
results_backend.set(key, zlib_compress(json_payload), cache_timeout)
query.results_key = key

query.status = QueryStatus.SUCCESS
session.commit()

if return_results:
Expand Down

0 comments on commit e43dc45

Please sign in to comment.