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

Fix distinct query for absences with custom excuse types

parent 1870ffa0
2 merge requests!326Resolve "Custom excuse types aren't counted correctly in generate_person_list_with_class_register_statistics",!323Prepare release 3.0b0
Pipeline #122156 failed
......@@ -11,9 +11,11 @@ Unreleased
Fixed
~~~~~
* In some cases, pages showing the count of extra marks and lessons with custom excuse types of
persons threw an error.
* The redirection to generated class register PDF printouts did not work.
* Absences with custom excuse types were not counted correctly.
`3.0b0`_ - 2022-02-28
---------------------
......
......@@ -482,7 +482,7 @@ def generate_person_list_with_class_register_statistics(
persons = persons.annotate(
**{
excuse_type.count_label: Count(
"filtered_personal_notes__absent",
"filtered_personal_notes",
filter=Q(
filtered_personal_notes__absent=True,
filtered_personal_notes__excuse_type=excuse_type,
......
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