Fix bad usage of a reserved word

This commit is contained in:
2014-04-10 08:29:58 +01:00
parent a644b280eb
commit 6297ae8ffd

View File

@@ -19,12 +19,12 @@ class TimerListView(ListView):
if int(self.request.GET.get('all', 0)) == 0:
qs = qs.filter(expiration__gt=now())
type = int(self.request.GET.get('type', 0))
if type == 1:
typ = int(self.request.GET.get('type', 0))
if typ == 1:
qs = [m for m in qs if m.location.get_type == 'Station']
if type == 2:
if typ == 2:
qs = [m for m in qs if m.location.get_type == 'System']
if type == 3:
if typ == 3:
qs = [m for m in qs if m.location.get_type == 'Moon']
return qs
@@ -35,4 +35,4 @@ class TimerListView(ListView):
'list_all': int(self.request.GET.get('all', 0)),
'list_type': int(self.request.GET.get('type', 0)),
})
return ctx
return ctx