Parcourir la source

Fix feedback when sending fee reminders

The case where several reminders were sent but only one was not rate-limited
was producing incorrect feedback.

Fix #51
Jocelyn Delalande il y a 6 ans
Parent
commit
a65b2449e1
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      coin/members/admin.py

+ 2 - 2
coin/members/admin.py

@@ -243,13 +243,13 @@ class MemberAdmin(UserAdmin):
                                      email=member.email,
                                      last_call_date=member.date_last_call_for_membership_fees_email))
 
-        if queryset.count() == 1 and cpt_success == 1:
+        if cpt_success == 1:
             member = queryset.first()
             messages.success(request,
                              "Le courriel de relance de cotisation a été "
                              "envoyé à {member} ({email})"\
                              .format(member=member, email=member.email))
-        elif cpt_success>1:
+        elif cpt_success > 1:
             messages.success(request,
                              "Le courriel de relance de cotisation a été "
                              "envoyé à {cpt} membres"\