diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue index 683d87c1f61df85b2db9fb095dfba1b1a51a8ee4..2cfd4a686be822011b38558e363bd447b84c4bc5 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue @@ -192,7 +192,7 @@ export default { dateStart: this.dateStart, dateEnd: this.dateEnd, incomplete: !!this.incomplete, - absencesExist: !!this.absencesExist, + absencesExist: !!this.absencesExist && this.pageType === "absences", }; }, filters: { diff --git a/aleksis/apps/alsijil/models.py b/aleksis/apps/alsijil/models.py index b80ac3e5271a6ff7f8709235d80bc4e0ef33c3df..6b12810231ac4bce7201018fd2fdb8359a163a9d 100644 --- a/aleksis/apps/alsijil/models.py +++ b/aleksis/apps/alsijil/models.py @@ -567,8 +567,8 @@ class Documentation(CalendarEvent): if (incomplete and doc.topic) or ( absences_exist and ( - not doc.participations.exists - or not doc.participations.filter(absence_reason__isnull=False).exists() + not doc.participations.all() + or not [d for d in doc.participations.all() if d.absence_reason] ) ): continue