trial account sattus fix
This commit is contained in:
@@ -85,7 +85,7 @@ class Account(SoftDeletableModel):
|
||||
plan = models.ForeignKey('igny8_core_auth.Plan', on_delete=models.PROTECT, related_name='accounts')
|
||||
credits = models.IntegerField(default=0, validators=[MinValueValidator(0)], help_text="Plan credits (reset on renewal)")
|
||||
bonus_credits = models.IntegerField(default=0, validators=[MinValueValidator(0)], help_text="Purchased/bonus credits (never expire, never reset)")
|
||||
status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='trial')
|
||||
status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='active')
|
||||
payment_method = models.CharField(
|
||||
max_length=30,
|
||||
choices=PAYMENT_METHOD_CHOICES,
|
||||
|
||||
@@ -404,7 +404,8 @@ class RegisterSerializer(serializers.Serializer):
|
||||
# simple monthly cycle; if annual needed, extend here
|
||||
billing_period_end = billing_period_start + timedelta(days=30)
|
||||
else:
|
||||
account_status = 'trial'
|
||||
# Free/trial plans get active status immediately
|
||||
account_status = 'active'
|
||||
initial_credits = plan.get_effective_credits_per_month()
|
||||
billing_period_start = None
|
||||
billing_period_end = None
|
||||
|
||||
Reference in New Issue
Block a user