Commit 9ca82af2 authored by Skia's avatar Skia 🤘
Browse files

Merge branch 'counter' into 'master'

fix can_buy in customer

See merge request ae/Sith!134
parents 23d86464 4af3239f
Pipeline #1422 passed with stage
in 5 minutes and 52 seconds
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment