Add filter "pending or expired" for correct links in the order overview

This commit is contained in:
Raphael Michel
2016-09-04 22:50:22 +02:00
parent a6bafd816b
commit 2569ebec55
3 changed files with 5 additions and 2 deletions

View File

@@ -59,6 +59,8 @@ class OrderList(EventPermissionRequiredMixin, ListView):
s = self.request.GET.get("status", "")
if s == 'o':
qs = qs.filter(status=Order.STATUS_PENDING, expires__lt=now().date())
elif s == 'ne':
qs = qs.filter(status__in=[Order.STATUS_PENDING, Order.STATUS_EXPIRED])
else:
qs = qs.filter(status=s)
if self.request.GET.get("item", "") != "":