Skip to content

Commit

Permalink
reset status message if an error is resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Sep 19, 2024
1 parent 6aea26d commit b87e5f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions breathecode/payments/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ def alert_payment_issue(message: str, button: str) -> None:

subscription.invoices.add(invoice)
subscription.status = "ACTIVE"
subscription.status_message = None
subscription.save()

value = invoice.currency.format_price(invoice.amount)
Expand Down Expand Up @@ -609,6 +610,7 @@ def alert_payment_issue(message: str, button: str) -> None:

plan_financing.next_payment_at += delta
plan_financing.status = "ACTIVE" if remaining_installments > 0 else "FULLY_PAID"
plan_financing.status_message = None
plan_financing.save()

# if this charge but the client paid all its installments, there hasn't been a new bag created
Expand Down

0 comments on commit b87e5f0

Please sign in to comment.