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

Fix distinct query for absences with custom excuse types

parent af849ace
No related branches found
No related tags found
No related merge requests found
Pipeline #118898 canceled
...@@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file. ...@@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_, The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_. 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 `3.0b0`_ - 2022-02-28
--------------------- ---------------------
......
...@@ -482,7 +482,7 @@ def generate_person_list_with_class_register_statistics( ...@@ -482,7 +482,7 @@ def generate_person_list_with_class_register_statistics(
persons = persons.annotate( persons = persons.annotate(
**{ **{
excuse_type.count_label: Count( excuse_type.count_label: Count(
"filtered_personal_notes__absent", "filtered_personal_notes",
filter=Q( filter=Q(
filtered_personal_notes__absent=True, filtered_personal_notes__absent=True,
filtered_personal_notes__excuse_type=excuse_type, 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