diff --git a/services/web/scripts/undelete_project_to_user.js b/services/web/scripts/undelete_project_to_user.js index 627e6eb1fb..7482f9eaba 100644 --- a/services/web/scripts/undelete_project_to_user.js +++ b/services/web/scripts/undelete_project_to_user.js @@ -1,4 +1,5 @@ const minimist = require('minimist') +const { waitForDb } = require('../app/src/infrastructure/mongodb') const ProjectDeleter = require('../app/src/Features/Project/ProjectDeleter') async function main() { @@ -10,6 +11,7 @@ async function main() { throw new Error('set --project-id and --user-id') } console.log(`Restoring project ${projectId} to user ${userId}`) + await waitForDb() await ProjectDeleter.promises.undeleteProject(projectId, { userId }) }