mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: update team membership deletion
This commit is contained in:
@@ -516,8 +516,8 @@ class Deletes extends Action
|
||||
if ($document->getAttribute('confirm')) { // Count only confirmed members
|
||||
$teamId = $document->getAttribute('teamId');
|
||||
$team = $dbForProject->getDocument('teams', $teamId);
|
||||
if (!$team->isEmpty() && $team->getAttribute('total', 0) > 0) {
|
||||
$dbForProject->decreaseDocumentAttribute('teams', $teamId, 'total', 1);
|
||||
if (!$team->isEmpty()) {
|
||||
$dbForProject->decreaseDocumentAttribute('teams', $teamId, 'total', 1, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user