diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0cc0df6a5f35239d530f914a3fa5b401d54c9107..b096c66cc5d69eaf1f3d180ea82fe617c01ff165 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Fixed persons threw an error. * The redirection to generated class register PDF printouts did not work. * Some columns in the table showing statistics for the members of a group were labled wrongly. +* 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,