diff --git a/packages/component-helper-service/src/services/Collection.js b/packages/component-helper-service/src/services/Collection.js index f39e84990cf553b1585dc421138ff9dae86852e9..dc3513909fd9a9efb99398080319d7ce0b091bd8 100644 --- a/packages/component-helper-service/src/services/Collection.js +++ b/packages/component-helper-service/src/services/Collection.js @@ -1,5 +1,3 @@ -const last = require('lodash/last') - class Collection { constructor({ collection = {} }) { this.collection = collection diff --git a/packages/component-invite/src/routes/fragmentsInvitations/delete.js b/packages/component-invite/src/routes/fragmentsInvitations/delete.js index b4da00bc268d61d124f9ef248f4ad3af04f91ecd..af74f13d32a60e8cac0c18837b23c57b384d2570 100644 --- a/packages/component-invite/src/routes/fragmentsInvitations/delete.js +++ b/packages/component-invite/src/routes/fragmentsInvitations/delete.js @@ -53,7 +53,9 @@ module.exports = models => async (req, res) => { inv => inv.id !== invitation.id, ) - await collectionHelper.updateStatusByNumberOfReviewers() + await collectionHelper.updateStatusByNumberOfReviewers({ + invitations: fragment.invitations, + }) await teamHelper.removeTeamMember({ teamId: team.id,