From 08829df54d57d25d0f9d317a00f7ed90c207b2a9 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 28 Apr 2026 15:32:28 +0200 Subject: [PATCH] =?UTF-8?q?fix(mentor):=20show=20non-suspended=20users=20i?= =?UTF-8?q?n=20pool=20+=20picker=20(=C2=A7B/=C2=A7C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mentor.getCandidates and mentor.getMentorPool both filtered on status='ACTIVE', which excluded every seeded mentor (status=NONE) and any INVITED mentor. Production scenario: PR 4's Manual Picker and PR 5's pool counts both rendered empty against real data. Filter changed to status != SUSPENDED — admins want to see all mentors they manage (including INVITED + NONE), but not suspended ones. Found via Playwright smoke of PR 5: pool count read 0 against 4 seeded mentors with roles[]=['MENTOR'], status='NONE'. --- src/server/routers/mentor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/routers/mentor.ts b/src/server/routers/mentor.ts index 2e04ebc..0205cff 100644 --- a/src/server/routers/mentor.ts +++ b/src/server/routers/mentor.ts @@ -169,7 +169,7 @@ export const mentorRouter = router({ const mentors = await ctx.prisma.user.findMany({ where: { roles: { has: 'MENTOR' }, - status: 'ACTIVE', + status: { not: 'SUSPENDED' }, }, select: { id: true, @@ -996,7 +996,7 @@ export const mentorRouter = router({ const mentors = await ctx.prisma.user.findMany({ where: { roles: { has: 'MENTOR' }, - status: 'ACTIVE', + status: { not: 'SUSPENDED' }, }, select: { id: true,