use enrollment organization for submissions

This commit is contained in:
2026-07-08 11:00:27 +09:00
parent 5a2ecd0fea
commit d6f1272afc
-10
View File
@@ -315,22 +315,12 @@ export class InstructorService {
organizationName ? { organizationName } : undefined, organizationName ? { organizationName } : undefined,
].filter(Boolean) as Prisma.StudentEnrollmentWhereInput[], ].filter(Boolean) as Prisma.StudentEnrollmentWhereInput[],
user: { user: {
AND: [
{
OR: [
organizationId ? { primaryOrganizationId: organizationId } : undefined,
organizationName ? { primaryOrganizationName: organizationName } : undefined,
].filter(Boolean) as Prisma.UserWhereInput[],
},
{
OR: [ OR: [
{ authRole: null }, { authRole: null },
{ authRole: 'STUDENT' }, { authRole: 'STUDENT' },
{ authRole: 'USER' }, { authRole: 'USER' },
], ],
}, },
],
},
}, },
include: { include: {
user: { user: {