diff options
author | Christian Pointner <equinox@helsinki.at> | 2017-03-09 17:22:39 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2017-03-09 17:22:39 (GMT) |
commit | c94e50658d1b0f80873aae3c8a9f80efa0bf1b91 (patch) | |
tree | df7bda0dd08b6239ac7bc1010f42805c5e411d3a /program/admin.py | |
parent | 77dc22a2ae7f3ddef4c4479e2ad17292dd6b07f7 (diff) | |
parent | 25b6bfba7d9b658b545673760445730dd915c461 (diff) |
Merge branch 'stable'
Diffstat (limited to 'program/admin.py')
-rw-r--r-- | program/admin.py | 12 |
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): |