Browse Source

Fix today() as default argument (see 3da3f994)

Baptiste Jonglez 10 years ago
parent
commit
a2225e1b1a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      coin/members/models.py

+ 3 - 1
coin/members/models.py

@@ -112,10 +112,12 @@ class Member(CoinLdapSyncMixin, AbstractUser):
             return self.membership_fees.order_by('-end_date')[0].end_date
     end_date_of_membership.short_description = "Date de fin d'adhésion"
 
-    def is_paid_up(self, date=datetime.date.today()):
+    def is_paid_up(self, date=None):
         """
         True si le membre est à jour de cotisation à la date passée. False sinon
         """
+        if date is None:
+            date = datetime.date.today()
         if self.end_date_of_membership() \
                 and self.end_date_of_membership() >= date:
             return True