Merge pull request #9864 from overleaf/msm-fix-audit-log

[scripts] fix audit log migration script

GitOrigin-RevId: a7e32217385ac66a899e34eb3e0e8373bc802944
This commit is contained in:
Miguel Serrano 2022-10-05 15:17:52 +02:00 committed by Copybot
parent 7d099acfdd
commit b1937700cc

View file

@ -89,10 +89,12 @@ async function processUsersBatch(users, options) {
}
await promiseMapWithLimit(options.writeConcurrency, users, async user => {
const projects = await db.projects.find(
const projects = await db.projects
.find(
{ owner_ref: user._id, auditLog: { $exists: true } },
{ _id: 1, auditLog: 1 }
)
.toArray()
await processProjectsBatch(projects, options)
})
}