fix: critical misstep in folder code (thanks tests)

This commit is contained in:
zkldi
2022-10-30 13:55:09 +00:00
parent e73bf2abc8
commit 824df0ae21
+10 -2
View File
@@ -190,10 +190,18 @@ export async function CreateFolderChartLookup(folder: FolderDocument, flush = fa
const ops: Array<BulkWriteOperation<FolderChartLookup>> = charts.map((c) => ({
updateOne: {
filter: c,
filter: {
chartID: c.chartID,
folderID: folder.folderID,
},
// amusing no-op
update: { $set: c },
update: {
$set: {
chartID: c.chartID,
folderID: folder.folderID,
},
},
upsert: true,
},
}));