diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1ee95a29fdd2e6c58458e3542e8be7a6605aecde..03c15c23bc1e10bea74192b9cf6eb8c679d75927 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog`_, and this project adheres to `Semantic Versioning`_. +Unreleased +---------- + +Fixed +~~~~~ + +* Absences with custom excuse types were always counted as 0 or 1. + `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,