summaryrefslogtreecommitdiff
path: root/program/admin.py
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2017-03-09 17:15:11 (GMT)
committerChristian Pointner <equinox@helsinki.at>2017-03-09 17:15:11 (GMT)
commit25b6bfba7d9b658b545673760445730dd915c461 (patch)
treedf7bda0dd08b6239ac7bc1010f42805c5e411d3a /program/admin.py
parent5391d900e79faafd3ace600ef2fc7b4a6e7b5786 (diff)
Hotfix: datetime.now as callable for query sets to fix implicit 'caching' problem after switching to uwsgi
Diffstat (limited to 'program/admin.py')
-rw-r--r--program/admin.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/program/admin.py b/program/admin.py
index 413531e..eb55554 100644
--- a/program/admin.py
+++ b/program/admin.py
@@ -19,21 +19,21 @@ class ActivityFilter(admin.SimpleListFilter):
def queryset(self, request, queryset):
if self.parameter_name == 'has_timeslots': # active/inactive ProgramSlots
if self.value() == 'yes':
- return queryset.filter(until__gt=datetime.now()).distinct()
+ return queryset.filter(until__gt=datetime.now).distinct()
if self.value() == 'no':
- return queryset.filter(until__lt=datetime.now()).distinct()
+ return queryset.filter(until__lt=datetime.now).distinct()
if self.parameter_name == 'has_programslots_timeslots': # active/inactive Shows
if self.value() == 'yes':
- return queryset.filter(programslots__until__gt=datetime.now()).distinct()
+ return queryset.filter(programslots__until__gt=datetime.now).distinct()
if self.value() == 'no':
- return queryset.filter(programslots__until__lt=datetime.now()).distinct()
+ return queryset.filter(programslots__until__lt=datetime.now).distinct()
if self.parameter_name == 'has_shows_programslots_timeslots': # active/inactive Hosts
if self.value() == 'yes':
- return queryset.filter(shows__programslots__until__gt=datetime.now()).distinct()
+ return queryset.filter(shows__programslots__until__gt=datetime.now).distinct()
if self.value() == 'no':
- return queryset.filter(shows__programslots__until__lt=datetime.now()).distinct()
+ return queryset.filter(shows__programslots__until__lt=datetime.now).distinct()
class ActiveProgramSlotsFilter(ActivityFilter):