Skip to content

Commit 4023cf1

Browse files
claudfuenclaude
andcommitted
fix: correct Prisma relation name policies -> policy in _count
Organization model uses singular `policy` not `policies`. Would have caused runtime Prisma validation error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent acb8df8 commit 4023cf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/api/src/admin-organizations/admin-organizations.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class AdminOrganizationsService {
125125
createdAt: true,
126126
hasAccess: true,
127127
onboardingCompleted: true,
128-
_count: { select: { members: true, tasks: true, policies: true, auditLog: true } },
128+
_count: { select: { members: true, tasks: true, policy: true, auditLog: true } },
129129
members: {
130130
where: { deactivated: false },
131131
select: {
@@ -187,7 +187,7 @@ export class AdminOrganizationsService {
187187
onboardingCompleted: org.onboardingCompleted,
188188
memberCount: org._count.members,
189189
taskCount: org._count.tasks,
190-
policyCount: org._count.policies,
190+
policyCount: org._count.policy,
191191
auditLogCount: org._count.auditLog,
192192
owner,
193193
lastSession: lastSession?.toISOString() ?? null,

0 commit comments

Comments
 (0)