Browse Source

Only send automated reminder mails to active members

Baptiste Jonglez 10 years ago
parent
commit
da9764c5ab
1 changed files with 2 additions and 1 deletions
  1. 2 1
      coin/members/management/commands/call_for_membership_fees.py

+ 2 - 1
coin/members/management/commands/call_for_membership_fees.py

@@ -39,7 +39,8 @@ class Command(BaseCommand):
                           "following dates : {dates}".format(
                               dates=[str(d) for d in end_dates]))
 
-        members = Member.objects.annotate(end=Max('membership_fees__end_date'))\
+        members = Member.objects.filter(status='member')\
+                                .annotate(end=Max('membership_fees__end_date'))\
                                 .filter(end__in=end_dates)
         self.stdout.write(
             "Got {number} members.".format(number=members.count()))