Skip to content

Commit

Permalink
add an error when all installments were paid
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Sep 19, 2024
1 parent d821e08 commit b153ee8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions breathecode/payments/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,10 @@ def alert_payment_issue(message: str, button: str) -> None:
plan_financing.next_payment_at += delta
plan_financing.save()

bag.was_delivered = True
bag.save()
# if this charge but the client paid all its installments, there hasn't been a new bag created
if bag:
bag.was_delivered = True
bag.save()

renew_plan_financing_consumables.delay(plan_financing.id)

Expand Down

0 comments on commit b153ee8

Please sign in to comment.