From c2b25bad060448ab2a483ac1aef1928287c354a3 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 23 Aug 2023 14:54:38 +0200 Subject: [PATCH] Event dashboard: Fix incorrect optimization introduced in 8e9f0f07a (#3540) --- src/pretix/control/views/dashboards.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pretix/control/views/dashboards.py b/src/pretix/control/views/dashboards.py index 31cdb8b6d7..1b5f628e6e 100644 --- a/src/pretix/control/views/dashboards.py +++ b/src/pretix/control/views/dashboards.py @@ -198,12 +198,12 @@ def waitinglist_widgets(sender, subevent=None, lazy=False, **kwargs): else item.check_quotas(subevent=subevent, count_waitinglist=False, _cache=quota_cache) ) if row[1] is None: - happy += 1 + happy += wlt['cnt'] elif row[1] > 0: - happy += 1 + happy += min(wlt['cnt'], row[1]) for q in quotas: if q.size is not None: - quota_cache[q.pk] = (quota_cache[q.pk][0], quota_cache[q.pk][1] - 1) + quota_cache[q.pk] = (quota_cache[q.pk][0], quota_cache[q.pk][1] - min(wlt['cnt'], row[1])) widgets.append({ 'content': None if lazy else NUM_WIDGET.format(