We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c74556 commit 6576993Copy full SHA for 6576993
1 file changed
src/utils.ts
@@ -282,6 +282,11 @@ export const getAllCohorts = async function(prisma: PrismaClient): Promise<Cohor
282
select: {
283
begin_at: true,
284
end_at: true,
285
+ user: {
286
+ select: {
287
+ alumnized_at: true,
288
+ },
289
290
},
291
});
292
const cohorts: Cohort[] = [];
@@ -291,7 +296,7 @@ export const getAllCohorts = async function(prisma: PrismaClient): Promise<Cohor
296
const activeCursus = cursusUser.end_at === null || cursusUser.end_at > new Date();
297
if (existingCohort) {
293
298
existingCohort.user_count++;
294
- if (activeCursus) {
299
+ if (activeCursus && !cursusUser.user.alumnized_at) {
295
300
existingCohort.user_count_active++;
301
}
302
0 commit comments