diff --git a/services/web/scripts/fix_malformed_filetree.js b/services/web/scripts/fix_malformed_filetree.js index a00e098972..9c7e34f93a 100644 --- a/services/web/scripts/fix_malformed_filetree.js +++ b/services/web/scripts/fix_malformed_filetree.js @@ -156,7 +156,7 @@ async function fixName(projectId, path) { const existingNames = new Set(array.map(x => x.name)) const name = findUniqueName(existingNames) const result = await db.projects.updateOne( - { _id: projectId, [path]: { $exists: false } }, + { _id: projectId, [path]: { $in: [null, ''] } }, { $set: { [path]: name } } ) return result.modifiedCount