diff --git a/app/services/grade_service.ts b/app/services/grade_service.ts index 59e7db1..ddf8ffb 100644 --- a/app/services/grade_service.ts +++ b/app/services/grade_service.ts @@ -44,6 +44,7 @@ export class GradeService { .where('studentId', userId) .where('date', '>=', startDate.toJSDate()) .where('date', '<', endDate.toJSDate()) + .whereNotNull('garde') .preload('subject') .orderBy('date', 'asc') } @@ -53,6 +54,7 @@ export class GradeService { .where('studentId', userId) .where('subjectId', subjectId) .where('date', '<', beforeDate.toJSDate()) + .whereNotNull('garde') return colles.length ? this.calculateAverage(colles) : 0 }