Skip to content

Commit acb74e7

Browse files
authored
Merge branch 'main' into no-tags-dbs-collections
2 parents 7be4c09 + e7633d7 commit acb74e7

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **Mongodb Compass**.
2-
This document was automatically generated on Mon Mar 24 2025.
2+
This document was automatically generated on Wed Mar 26 2025.
33

44
## List of dependencies
55

docs/tracking-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
> the tracking plan for the specific Compass version you can use the following
88
> URL: `https://github.com/mongodb-js/compass/blob/<compass version>/docs/tracking-plan.md`
99
10-
Generated on Mon, Mar 24, 2025
10+
Generated on Wed, Mar 26, 2025
1111

1212
## Table of Contents
1313

packages/compass-saved-aggregations-queries/src/stores/delete-item.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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 });

packages/compass-saved-aggregations-queries/src/stores/edit-item.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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({

packages/compass-saved-aggregations-queries/src/stores/open-item.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
// query or updatemany
576577
await queryStorage?.updateAttributes(id, { _ns: newNamespace });
577578
}
578579
}

0 commit comments

Comments
 (0)