Cancelling events: Fix send_waitinglist flag

This commit is contained in:
Raphael Michel
2020-07-23 21:38:58 +02:00
parent a310c33497
commit b5dca762f0
2 changed files with 4 additions and 3 deletions

View File

@@ -222,7 +222,8 @@ def cancel_event(self, event: Event, subevent: int, auto_refund: bool, keep_fee_
if send:
_send_mail(o, send_subject, send_message, subevent, refund_amount, user, positions)
for wle in event.waitinglistentries.filter(subevent=subevent, voucher__isnull=True):
_send_wle_mail(wle, send_waitinglist_subject, send_waitinglist_message, subevent)
if send_waitinglist:
for wle in event.waitinglistentries.filter(subevent=subevent, voucher__isnull=True):
_send_wle_mail(wle, send_waitinglist_subject, send_waitinglist_message, subevent)
return failed

View File

@@ -2032,7 +2032,7 @@ class EventCancel(EventPermissionRequiredMixin, AsyncAction, FormView):
send=form.cleaned_data.get('send'),
send_subject=form.cleaned_data.get('send_subject').data,
send_message=form.cleaned_data.get('send_message').data,
send_waitinglist=form.cleaned_data.get('send'),
send_waitinglist=form.cleaned_data.get('send_waitinglist'),
send_waitinglist_subject=form.cleaned_data.get('send_waitinglist_subject').data,
send_waitinglist_message=form.cleaned_data.get('send_waitinglist_message').data,
user=self.request.user.pk,