Ensure the send_mail argument to save_position is a boolean.

- Legacy-Id: 15547
This commit is contained in:
Henrik Levkowetz 2018-10-09 16:34:45 +00:00
parent fb1baefcc1
commit 15c8ab9506

View file

@ -209,7 +209,7 @@ def edit_position(request, name, ballot_id):
form = EditPositionForm(request.POST, ballot_type=ballot.ballot_type)
if form.is_valid():
send_mail = request.POST.get("send_mail") or False
send_mail = True if request.POST.get("send_mail") else False
save_position(form, doc, ballot, ad, login, send_mail)
if send_mail: