Skip to content
Snippets Groups Projects
Commit 77983610 authored by Anca Ursachi's avatar Anca Ursachi
Browse files

fix(delete(collectionsInvitations)): Reviewer team from current version should...

fix(delete(collectionsInvitations)): Reviewer team from current version should be deleted when HE is
parent 7c0d0663
No related branches found
No related tags found
3 merge requests!176Sprint 24,!171Sprint 24,!168Hin 845 revoke and assign he fix
......@@ -71,6 +71,21 @@ module.exports = models => async (req, res) => {
last(get(collection, 'fragments', [])),
)
const fragmentId = fragment.id
const teamHelperForFragment = new Team({
TeamModel: models.Team,
collectionId,
fragmentId,
})
const teams = await teamHelperForFragment.getTeams('fragment')
const reviewerTeam = teams.find(
team => team.object.id === fragmentId && team.group === 'reviewer',
)
if (reviewerTeam) {
reviewerTeam.delete()
}
const fileKeys = []
fragment.recommendations &&
fragment.recommendations.forEach(recommendation => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment