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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0d240c3  fix: properly keep state on queryEditorSetSql on tabstateview 
PUT (#14579)
0d240c3 is described below

commit 0d240c3841fcfdf46717ab372074caedcf5c572e
Author: Hugh A. Miles II <[email protected]>
AuthorDate: Wed May 12 15:20:26 2021 -0400

    fix: properly keep state on queryEditorSetSql on tabstateview PUT (#14579)
    
    * send queryid up with setSQL
    
    * pass latest query id
    
    * update
    
    * cleanup
---
 superset-frontend/src/SqlLab/actions/sqlLab.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js 
b/superset-frontend/src/SqlLab/actions/sqlLab.js
index 95216b8..8124907 100644
--- a/superset-frontend/src/SqlLab/actions/sqlLab.js
+++ b/superset-frontend/src/SqlLab/actions/sqlLab.js
@@ -897,7 +897,7 @@ export function queryEditorSetSql(queryEditor, sql) {
     const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)
       ? SupersetClient.put({
           endpoint: encodeURI(`/tabstateview/${queryEditor.id}`),
-          postPayload: { sql },
+          postPayload: { sql, latest_query_id: queryEditor.latestQueryId },
         })
       : Promise.resolve();
 

Reply via email to