diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 54093096603c53189ce421766aaf9cd82e389ea7..2570ecf954b5d8d6c941778ce79a0aaa50cb252b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 --------------------- diff --git a/aleksis/apps/alsijil/model_extensions.py b/aleksis/apps/alsijil/model_extensions.py index 60504010d83ddcedb7a73646a28a2eb421e2fa62..8a92d667106efd853b225f946c4139b0d5799ef6 100644 --- a/aleksis/apps/alsijil/model_extensions.py +++ b/aleksis/apps/alsijil/model_extensions.py @@ -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,