mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-11 13:16:09 +00:00
Merge branch 'counter' into 'master'
fix can_buy in customer See merge request ae/Sith!134
This commit is contained in:
commit
9ca82af219
1 file changed
+1
-1
+1
-1
@@ -71,7 +71,7 @@ class Customer(models.Model):
|
||||
@property
|
||||
def can_buy(self):
|
||||
return (self.user.subscriptions.last() and
|
||||
(date.today() - self.user.subscriptions.last().subscription_end) < timedelta(days=90))
|
||||
(date.today() - self.user.subscriptions.order_by('subscription_end').last().subscription_end) < timedelta(days=90))
|
||||
|
||||
def generate_account_id(number):
|
||||
number = str(number)
|
||||
|
||||
Reference in new issue
Block a user