mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Fix broken aggregation in orders per product statistics
This commit is contained in:
@@ -65,14 +65,14 @@ class IndexView(EventPermissionRequiredMixin, ChartContainingView, TemplateView)
|
||||
for p in (OrderPosition.objects
|
||||
.filter(order__event=self.request.event)
|
||||
.values('item')
|
||||
.annotate(cnt=Count('id')))
|
||||
.annotate(cnt=Count('id')).order_by())
|
||||
}
|
||||
num_paid = {
|
||||
p['item']: p['cnt']
|
||||
for p in (OrderPosition.objects
|
||||
.filter(order__event=self.request.event, order__status=Order.STATUS_PAID)
|
||||
.values('item')
|
||||
.annotate(cnt=Count('id')))
|
||||
.annotate(cnt=Count('id')).order_by())
|
||||
}
|
||||
item_names = {
|
||||
i.id: str(i.name)
|
||||
|
||||
Reference in New Issue
Block a user