upstream/v2026.1.0 #12

Merged
simon merged 241 commits from upstream/v2026.1.0 into master 2026-02-03 21:56:32 +00:00
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 9f4cbabd30 - Show all commits

View File

@@ -59,6 +59,14 @@
</div>
<div class="panel-body">
<div id="obp_chart" class="chart"></div>
<p class="help-block">
<small>
{% blocktrans trimmed %}
Placed orders include all orders (pending, paid, cancelled, and expired);
paid orders include only paid orders and exclude all cancelled orders.
{% endblocktrans %}
</small>
</p>
</div>
</div>
{% if seats %}

View File

@@ -128,7 +128,7 @@ class IndexView(EventPermissionRequiredMixin, ChartContainingView, TemplateView)
# Orders by product
ctx['obp_data'] = cache.get('statistics_obp_data' + ckey)
if not ctx['obp_data']:
opqs = OrderPosition.objects
opqs = OrderPosition.all
if subevent:
opqs = opqs.filter(subevent=subevent)
num_ordered = {
@@ -141,7 +141,7 @@ class IndexView(EventPermissionRequiredMixin, ChartContainingView, TemplateView)
num_paid = {
p['item']: p['cnt']
for p in (opqs
.filter(order__event=self.request.event, order__status=Order.STATUS_PAID)
.filter(order__event=self.request.event, order__status=Order.STATUS_PAID, canceled=False)
.values('item')
.annotate(cnt=Count('id')).order_by())
}