From d6f1272afcabde181120e82757fc8d05cc10d667 Mon Sep 17 00:00:00 2001 From: chyoo Date: Wed, 8 Jul 2026 11:00:27 +0900 Subject: [PATCH] use enrollment organization for submissions --- src/instructor/instructor.service.ts | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/instructor/instructor.service.ts b/src/instructor/instructor.service.ts index 14f9b98..4f0871d 100644 --- a/src/instructor/instructor.service.ts +++ b/src/instructor/instructor.service.ts @@ -315,20 +315,10 @@ export class InstructorService { organizationName ? { organizationName } : undefined, ].filter(Boolean) as Prisma.StudentEnrollmentWhereInput[], user: { - AND: [ - { - OR: [ - organizationId ? { primaryOrganizationId: organizationId } : undefined, - organizationName ? { primaryOrganizationName: organizationName } : undefined, - ].filter(Boolean) as Prisma.UserWhereInput[], - }, - { - OR: [ - { authRole: null }, - { authRole: 'STUDENT' }, - { authRole: 'USER' }, - ], - }, + OR: [ + { authRole: null }, + { authRole: 'STUDENT' }, + { authRole: 'USER' }, ], }, },