summaryrefslogtreecommitdiff
path: root/program/models.py
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2012-11-26 19:45:54 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2012-11-26 19:45:54 (GMT)
commitd05a248aa90ee1a1936dc86a9a7b5b2c827585e9 (patch)
treec1a9ff3f4c003f554a8242f7a298101d7d79e303 /program/models.py
parent4b5a38c62efa9701337fb76f1d152c0f8c415936 (diff)
fixed week view
Diffstat (limited to 'program/models.py')
-rw-r--r--program/models.py3
1 files changed, 2 insertions, 1 deletions
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"))