Merge pull request #2023 from overleaf/spd-fix-deleted-project-expiry

Fix not-found error when cleaning up deleted projects

GitOrigin-RevId: db3d0f8756319dbeb7ff753a8603cf61b9fb8a0c
This commit is contained in:
Simon Detheridge 2019-07-30 09:28:33 +01:00 committed by sharelatex
parent e197d58103
commit d9d9ee9541
2 changed files with 4 additions and 3 deletions

View file

@ -103,7 +103,7 @@ const ProjectDeleter = {
deletedProjects,
function(deletedProject, cb) {
ProjectDeleter.expireDeletedProject(
deletedProject.deletedProjectId,
deletedProject.deleterData.deletedProjectId,
cb
)
},

View file

@ -58,7 +58,8 @@ describe('ProjectDeleter', () => {
.subtract(95, 'days')
.toDate(),
deleterId: '588f3ddae8ebc1bac07c9fa4',
deleterIpAddress: '172.19.0.1'
deleterIpAddress: '172.19.0.1',
deletedProjectId: '5cf9270b4eff6e186cf8b05e'
},
project: {
_id: '5cf9270b4eff6e186cf8b05e'
@ -359,7 +360,7 @@ describe('ProjectDeleter', () => {
it('should call expireDeletedProject', done => {
expect(this.ProjectDeleter.expireDeletedProject).to.have.been.calledWith(
this.deletedProjects[0].deletedProjectId
this.deletedProjects[0].deleterData.deletedProjectId
)
done()
})