mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 07:56:01 +00:00
fixed mongo update condition
This commit is contained in:
@@ -21,7 +21,9 @@ const mongoIdRegex = /^[0-9a-f]{24}$/;
|
||||
function convertConditionInternal(condition) {
|
||||
if (condition && _.isString(condition._id) && condition._id.match(mongoIdRegex)) {
|
||||
return {
|
||||
_id: ObjectId(condition._id),
|
||||
_id: {
|
||||
$in: [condition._id, ObjectId(condition._id)],
|
||||
},
|
||||
};
|
||||
}
|
||||
return condition;
|
||||
|
||||
Reference in New Issue
Block a user