Skip to content

Commit

Permalink
fix(sql lab): View result button is not showing consistently (#20164)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomedina248 authored Jun 3, 2022
1 parent a020f75 commit 9205785
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions superset-frontend/src/SqlLab/reducers/sqlLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ export default function sqlLabReducer(state = {}, action) {
errorMessage: null,
cached: false,
};

const resultsKey = action?.results?.query?.resultsKey;
if (resultsKey) {
alts.resultsKey = resultsKey;
}

return alterInObject(state, 'queries', action.query, alts);
},
[actions.QUERY_FAILED]() {
Expand Down
1 change: 1 addition & 0 deletions superset/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ def execute_sql_statements( # pylint: disable=too-many-arguments, too-many-loca

if store_results and results_backend:
key = str(uuid.uuid4())
payload["query"]["resultsKey"] = key
logger.info(
"Query %s: Storing results in results backend, key: %s", str(query_id), key
)
Expand Down

0 comments on commit 9205785

Please sign in to comment.