fix(teams): added comment
This commit is contained in:
parent
a6db680641
commit
b7efefa40f
2 changed files with 2 additions and 2 deletions
|
@ -784,7 +784,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId')
|
||||||
|
|
||||||
if ($membership->getAttribute('confirm')) { // Count only confirmed members
|
if ($membership->getAttribute('confirm')) { // Count only confirmed members
|
||||||
$team = $projectDB->updateDocument(\array_merge($team->getArrayCopy(), [
|
$team = $projectDB->updateDocument(\array_merge($team->getArrayCopy(), [
|
||||||
'sum' => \max($team->getAttribute('sum', 0) - 1, 0),
|
'sum' => \max($team->getAttribute('sum', 0) - 1, 0), // Ensure that sum is always >= 0
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ class DeletesV1
|
||||||
$team = $this->getProjectDB($projectId)->getDocument($teamId);
|
$team = $this->getProjectDB($projectId)->getDocument($teamId);
|
||||||
if(!$team->isEmpty()) {
|
if(!$team->isEmpty()) {
|
||||||
$team = $this->getProjectDB($projectId)->updateDocument(\array_merge($team->getArrayCopy(), [
|
$team = $this->getProjectDB($projectId)->updateDocument(\array_merge($team->getArrayCopy(), [
|
||||||
'sum' => \max($team->getAttribute('sum', 0) - 1, 0),
|
'sum' => \max($team->getAttribute('sum', 0) - 1, 0), // Ensure that sum is always >= 0
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue