File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
packages/compass-saved-aggregations-queries/src/stores Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,11 @@ export const confirmDeleteItem = (
5555 undefined // this event is connection scoped when triggered from the aggregation or query screen
5656 ) ;
5757
58- if ( item . type === 'query' ) {
59- await queryStorage ?. delete ( item . id ) ;
60- } else {
58+ if ( item . type === 'aggregation' ) {
6159 await pipelineStorage ?. delete ( item . id ) ;
60+ } else {
61+ // query or updatemany
62+ await queryStorage ?. delete ( item . id ) ;
6263 }
6364
6465 dispatch ( { type : ActionTypes . DeleteItemConfirm , id : item . id } ) ;
Original file line number Diff line number Diff line change @@ -87,13 +87,14 @@ export const updateItem =
8787 return ;
8888 }
8989
90- if ( item . type === 'query' ) {
90+ if ( item . type === 'aggregation' ) {
91+ await pipelineStorage ?. updateAttributes ( id , attributes ) ;
92+ } else {
93+ // query or updatemany
9194 await queryStorage ?. updateAttributes ( id , {
9295 _name : attributes . name ,
9396 _dateModified : new Date ( ) ,
9497 } ) ;
95- } else {
96- await pipelineStorage ?. updateAttributes ( id , attributes ) ;
9798 }
9899
99100 dispatch ( {
Original file line number Diff line number Diff line change @@ -572,7 +572,8 @@ export const openSelectedItem =
572572 await pipelineStorage ?. updateAttributes ( id , {
573573 namespace : newNamespace ,
574574 } ) ;
575- } else if ( selectedItem . type === 'query' ) {
575+ } else {
576+ // queries, bulk updates and everything else
576577 await queryStorage ?. updateAttributes ( id , { _ns : newNamespace } ) ;
577578 }
578579 }
You can’t perform that action at this time.
0 commit comments