Waitinglist: Improve waitinglist and logging

This commit is contained in:
Raphael Michel
2017-02-10 11:19:22 +01:00
parent c03ac624fc
commit 8310597944
6 changed files with 16 additions and 12 deletions

View File

@@ -54,7 +54,7 @@
{% trans "Sales estimate" %}
</div>
<div class="panel-body">
{% blocktrans trimmed with amount=estimate|floatformat:2 currency=request.event.currency %}
{% blocktrans trimmed with amount=estimate|default:0|floatformat:2 currency=request.event.currency %}
If you can make enough room at your event to fit all the persons on the waiting list in, you
could sell tickets worth an additional <strong>{{ amount }} {{ currency }}</strong>.
{% endblocktrans %}

View File

@@ -32,7 +32,7 @@ class AutoAssign(EventPermissionRequiredMixin, AsyncAction, View):
})
def post(self, request, *args, **kwargs):
return self.do(self.request.event.id)
return self.do(self.request.event.id, self.request.user.id)
class WaitingListView(EventPermissionRequiredMixin, ListView):
@@ -55,7 +55,7 @@ class WaitingListView(EventPermissionRequiredMixin, ListView):
pk=request.POST.get('assign'), event=self.request.event,
)
try:
wle.send_voucher()
wle.send_voucher(user=request.user)
except WaitingListException as e:
messages.error(request, str(e))
else: