From 5bcd142b6f1956af136b93f468762de40158c905 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 12 Apr 2021 16:54:11 +0100 Subject: [PATCH] [MongoManager] drop name filter from getProjectsDeletedDocs All the doc names we had in the projects collection are back-filled now. A few docs will get dummy values back-filled. --- services/docstore/app/js/MongoManager.js | 4 +--- services/docstore/test/unit/js/MongoManagerTests.js | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/services/docstore/app/js/MongoManager.js b/services/docstore/app/js/MongoManager.js index 7dc0afeb6c..8c6538ea76 100644 --- a/services/docstore/app/js/MongoManager.js +++ b/services/docstore/app/js/MongoManager.js @@ -39,9 +39,7 @@ module.exports = MongoManager = { .find( { project_id: ObjectId(project_id.toString()), - deleted: true, - // TODO(das7pad): remove name filter after back filling data - name: { $exists: true } + deleted: true }, { projection: filter, diff --git a/services/docstore/test/unit/js/MongoManagerTests.js b/services/docstore/test/unit/js/MongoManagerTests.js index 7bf2c2d1a6..4e54a56586 100644 --- a/services/docstore/test/unit/js/MongoManagerTests.js +++ b/services/docstore/test/unit/js/MongoManagerTests.js @@ -192,8 +192,7 @@ describe('MongoManager', function () { this.db.docs.find .calledWith({ project_id: ObjectId(this.project_id), - deleted: true, - name: { $exists: true } + deleted: true }) .should.equal(true) })