core: fix linkedFile.delete

This commit is contained in:
undefined committed 2024-08-31 20:55:16 +08:00
1 parent 50f1ac9278
commit 66dcdfd590
1 file changed
+1 -1
+1 -1
View File
@@ -57,7 +57,7 @@ export class StorageModel {
const processedIds = [];
for (const i of linked || []) {
if (processedIds.includes(i.link)) continue;
const current = affected.find((t) => t._id === t.link); // to be deleted
const current = affected.find((t) => t._id === i.link); // to be deleted
// eslint-disable-next-line no-await-in-loop
await Promise.all([
StorageModel.coll.updateOne({ _id: current._id }, { $set: omit(i, ['_id']) }),