From 31eec46f71e43c73307eb68a925dac36e4ac4094 Mon Sep 17 00:00:00 2001 From: mariusrklein <47218379+mariusrklein@users.noreply.github.com> Date: Sun, 27 Apr 2025 13:42:52 +0200 Subject: [PATCH] fixed seminar day calculation again --- jdav_web/members/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdav_web/members/models.py b/jdav_web/members/models.py index cffe0fd..16ec653 100644 --- a/jdav_web/members/models.py +++ b/jdav_web/members/models.py @@ -1314,8 +1314,8 @@ class Freizeit(CommonModel): .annotate(total_duration=Sum('duration'))# Sum durations for each day .annotate( sum_days=Case( - When(total_duration__gt=5.0, then=Value(1.0)), - When(total_duration__gt=2.5, then=Value(0.5)), + When(total_duration__gte=5.0, then=Value(1.0)), + When(total_duration__gte=2.5, then=Value(0.5)), default=Value(0.0),) ) .order_by('day') # Sort results by date