diff --git a/packages/trpc/server/routers/viewer/teams.tsx b/packages/trpc/server/routers/viewer/teams.tsx index 249231c854..e9d9b5dcd4 100644 --- a/packages/trpc/server/routers/viewer/teams.tsx +++ b/packages/trpc/server/routers/viewer/teams.tsx @@ -85,7 +85,9 @@ export const viewerTeamsRouter = router({ const { slug, name, logo } = input; const nameCollisions = await ctx.prisma.team.findFirst({ - where: { OR: [{ name }, { slug }] }, + where: { + slug: slug, + }, }); if (nameCollisions) throw new TRPCError({ code: "BAD_REQUEST", message: "Team name already taken." });