From d05a248aa90ee1a1936dc86a9a7b5b2c827585e9 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Mon, 26 Nov 2012 20:45:54 +0100 Subject: fixed week view diff --git a/program/models.py b/program/models.py index e053cf4..bac192c 100644 --- a/program/models.py +++ b/program/models.py @@ -275,7 +275,8 @@ class TimeSlotManager(models.Manager): today = datetime.combine(day, time(6,0)) tomorrow = today + timedelta(days=1) - return TimeSlot.objects.filter(models.Q(start__lte=today, end__gte=today) | models.Q(start__gt=today, start__lt=tomorrow)) + return TimeSlot.objects.filter(models.Q(start__lte=today, end__gte=today) | + models.Q(start__gt=today, start__lt=tomorrow)).exclude(end=today) class TimeSlot(models.Model): programslot = models.ForeignKey(ProgramSlot, related_name='timeslots', verbose_name=_("Program slot")) -- cgit v0.10.2