Skip to content
Snippets Groups Projects
Verified Commit fe81ec8a authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix and improve absences query for coursebook

parent ffdf582e
No related branches found
No related tags found
1 merge request!363Resolve "Add absence overview page"
Pipeline #191658 failed
......@@ -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: {
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment