You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/03/05 11:26:21 UTC

[GitHub] [incubator-superset] kristw commented on a change in pull request #6910: Fixes issue #5804 - SQLLab - Saving a query with the same label resul…

kristw commented on a change in pull request #6910: Fixes issue #5804 - SQLLab - Saving a query with the same label resul…
URL: https://github.com/apache/incubator-superset/pull/6910#discussion_r262456760
 
 

 ##########
 File path: superset/assets/src/SqlLab/actions/sqlLab.js
 ##########
 @@ -77,14 +77,27 @@ export function resetState() {
 }
 
 export function saveQuery(query) {
-  return dispatch =>
-    SupersetClient.post({
-      endpoint: '/savedqueryviewapi/api/create',
-      postPayload: query,
-      stringify: false,
-    })
-      .then(() => dispatch(addSuccessToast(t('Your query was saved'))))
-      .catch(() => dispatch(addDangerToast(t('Your query could not be saved'))));
+     let ret;
+     if (isNaN((query.id))) {
 
 Review comment:
   `Number.isNaN()` instead of `isNaN()`.
   Also remove the extra parentheses

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org