fix: scope organisation group deletion (#3047)

This commit is contained in:
David Nguyen
2026-06-29 14:11:31 +10:00
committed by GitHub
parent 8f68393241
commit 1f170ef5e5
@@ -85,6 +85,7 @@ export const deleteTeam = async ({ userId, teamId }: DeleteTeamOptions) => {
// Purge all internal organisation groups that have no teams.
await tx.organisationGroup.deleteMany({
where: {
organisationId: team.organisationId,
type: OrganisationGroupType.INTERNAL_TEAM,
teamGroups: {
none: {},