chore: update team membership deletion
This commit is contained in:
parent
3c7fae7843
commit
7b5be4e154
1 changed files with 2 additions and 2 deletions
|
@ -516,8 +516,8 @@ class Deletes extends Action
|
||||||
if ($document->getAttribute('confirm')) { // Count only confirmed members
|
if ($document->getAttribute('confirm')) { // Count only confirmed members
|
||||||
$teamId = $document->getAttribute('teamId');
|
$teamId = $document->getAttribute('teamId');
|
||||||
$team = $dbForProject->getDocument('teams', $teamId);
|
$team = $dbForProject->getDocument('teams', $teamId);
|
||||||
if (!$team->isEmpty() && $team->getAttribute('total', 0) > 0) {
|
if (!$team->isEmpty()) {
|
||||||
$dbForProject->decreaseDocumentAttribute('teams', $teamId, 'total', 1);
|
$dbForProject->decreaseDocumentAttribute('teams', $teamId, 'total', 1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue