Skip to content

Commit

Permalink
Fix issue 280: "Re-send confirmation e-mail to all unconfirmed" resen…
Browse files Browse the repository at this point in the history
…ds the email to ALL signatories.
  • Loading branch information
Xebax authored and fallen committed Jun 20, 2021
1 parent c851014 commit 9537aae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pytition/petition/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,16 +1396,17 @@ def show_signatures(request, petition_id):
messages.success(request, _("You successfully deleted all selected signatures"))
if action == "re-send":
for s in selected_signatures:
try:
send_confirmation_email(request, s)
except:
failed = True
if not s.confirmed:
try:
send_confirmation_email(request, s)
except:
failed = True
if failed:
messages.error(request, _("An error happened while trying to re-send confirmation emails"))
else:
messages.success(request, _("You successfully re-sent all selected confirmation emails"))
if action == "re-send-all":
selected_signatures = Signature.objects.filter(petition=petition)
selected_signatures = Signature.objects.filter(petition=petition, confirmed=False)
for s in selected_signatures:
try:
send_confirmation_email(request, s)
Expand Down

0 comments on commit 9537aae

Please sign in to comment.