mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Migrate and improve subscriptions
This commit is contained in:
@ -53,7 +53,8 @@ class Subscription(models.Model):
|
||||
super(Subscription, self).save()
|
||||
from counter.models import Customer
|
||||
if not Customer.objects.filter(user=self.member).exists():
|
||||
Customer(user=self.member, account_id=Customer.generate_account_id(self.id), amount=0).save()
|
||||
last_id = Customer.objects.count() + 5195 # Number to keep a continuity with the old site
|
||||
Customer(user=self.member, account_id=Customer.generate_account_id(last_id+1), amount=0).save()
|
||||
self.member.make_home()
|
||||
|
||||
def get_absolute_url(self):
|
||||
|
Reference in New Issue
Block a user