Skip to content

Commit 1e103b5

Browse files
committed
#1182 - update backend checks
1 parent e2c3ab4 commit 1e103b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/backend/src/services/teams.services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export default class TeamsService {
194194

195195
// checking to see if any other teams have the new head as their current head or lead
196196
const newHeadTeam = await prisma.team.findFirst({
197-
where: { OR: [{ headId }, { leads: { some: { userId: headId } } }] }
197+
where: { headId }
198198
});
199199

200200
if (newHeadTeam) throw new HttpException(400, 'The new team head must not be a head or lead of another team');

0 commit comments

Comments
 (0)