From 7420d565e13ae18cd051449f03902e784c115295 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Thu, 7 Jul 2022 11:21:47 +0300 Subject: [PATCH] bugfix --- src/structure/storage/interfaces/MongodbTable.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/structure/storage/interfaces/MongodbTable.js b/src/structure/storage/interfaces/MongodbTable.js index 4bcbaf2..b097d7a 100644 --- a/src/structure/storage/interfaces/MongodbTable.js +++ b/src/structure/storage/interfaces/MongodbTable.js @@ -170,8 +170,7 @@ class MongodbTable { } _handleData(data) { //Convert data._id to Mongo ObjectIds - console.log(data); - if (data._id) { + if (data._id && !(data._id instanceof ObjectId)) { if (typeof data._id === 'string') data._id = ObjectId(data._id); else if (typeof data._id === 'object') data._id = { $in: Object.values(data._id)[0].map((id) => {