diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 4ece69312..d870f49af 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -1086,7 +1086,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') if ($team->isEmpty()) { throw new Exception(Exception::TEAM_NOT_FOUND); } - + if ($membership->getAttribute('teamInternalId') !== $team->getInternalId()) { throw new Exception(Exception::TEAM_MEMBERSHIP_MISMATCH); }