use enrollment organization for submissions

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