Skip to content

Commit

Permalink
update a cond about payment endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Oct 31, 2024
1 parent b7fee23 commit 3992a79
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions breathecode/payments/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,8 @@ def ask_to_add_plan_and_charge_it_in_the_bag(plan: Plan, user: User, lang: str):
price
and plan.is_renewable
and subscriptions.filter(
Q(Q(status="CANCELLED") | Q(status="DEPRECATED"), valid_until=None, next_payment_at__gte=utc_now)
| Q(valid_until__gte=utc_now)
)
Q(valid_until=None, next_payment_at__gte=utc_now) | Q(valid_until__gte=utc_now)
).exclude(status__in=["CANCELLED", "DEPRECATED"])
):
raise ValidationException(
translation(
Expand Down

0 comments on commit 3992a79

Please sign in to comment.