mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 21:31:36 +02:00
Merge pull request #16186 from overleaf/mj-mongo-object-id
[web] Use constructor for ObjectId GitOrigin-RevId: 9eb8b377ea599605b72af237d1ab12f4d8287162
This commit is contained in:
committed by
Copybot
parent
0ac514f81b
commit
c371732e6e
@@ -568,7 +568,7 @@ async function _putElement(project, folderId, element, type) {
|
||||
throw new Errors.InvalidNameError('blocked element name')
|
||||
}
|
||||
_checkValidElementName(folder, element.name)
|
||||
element._id = ObjectId(element._id.toString())
|
||||
element._id = new ObjectId(element._id.toString())
|
||||
const mongoPath = `${path.mongo}.${pathSegment}`
|
||||
const newProject = await Project.findOneAndUpdate(
|
||||
{ _id: project._id, [path.mongo]: { $exists: true } },
|
||||
|
||||
Reference in New Issue
Block a user