diff --git a/migrations/users/take-this.js b/migrations/users/take-this.js index 5c33ad12ee..e2d30ccb72 100644 --- a/migrations/users/take-this.js +++ b/migrations/users/take-this.js @@ -73,7 +73,7 @@ export default async function processUsers () { break; } else { query._id = { - $gt: users[users.length - 1], + $gt: users[users.length - 1]?._id, // Here you’re passing the whole user object instead of its _id }; }