Skip to content

Commit

Permalink
Fix django deprecation error
Browse files Browse the repository at this point in the history
  • Loading branch information
johanvdw committed Jan 29, 2024
1 parent ce30de5 commit 2097415
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions volunteers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def mass_mail_volunteer(self, request, queryset):
'Mail with subject "{}" sent to {} volunteer{}.'.format(subject, count, plural))
return HttpResponseRedirect(request.get_full_path())
if not form:
form = self.MassMailForm(initial={'_selected_action': request.POST.getlist(admin.ACTION_CHECKBOX_NAME)})
form = self.MassMailForm(initial={'_selected_action': request.POST.getlist("_selected_action")})
return render(request, 'admin/massmail.html', {'volunteers': volunteers,
'massmail_form': form,
})
Expand Down Expand Up @@ -415,7 +415,7 @@ def mass_mail_volunteer(self, request, queryset):
'Mail with subject "{}" sent to {} volunteer{}.'.format(subject, count, plural))
return HttpResponseRedirect(request.get_full_path())
if not form:
form = self.MassMailForm(initial={'_selected_action': request.POST.getlist(admin.ACTION_CHECKBOX_NAME)})
form = self.MassMailForm(initial={'_selected_action': request.POST.getlist("_selected_action")})
return render(request, 'admin/massmail.html', {'volunteers': queryset,
'massmail_form': form,
})
Expand Down

0 comments on commit 2097415

Please sign in to comment.