You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the view initiate_checkout, we exit early if cart total is 0.
Let's instead make it check individual tickets: all(t.price == 0 for t in cart.tickets.all()) and then simply "sell the tickets" to the person and then exit.
This also should be accompanied with a refactor. We have "sell the tickets" logic in complete_checkout. Move this to a separate helper function so that both the free ticket purchase path and paid ticket purchase path can use this shared function.
We also need one more refactor: the response returned should indicate that the tickets have been sold and the frontend doesn't need to call complete_checkout. This will require changing the response schema.
The text was updated successfully, but these errors were encountered:
in the view
initiate_checkout
, we exit early if cart total is 0.Let's instead make it check individual tickets:
all(t.price == 0 for t in cart.tickets.all())
and then simply "sell the tickets" to the person and then exit.This also should be accompanied with a refactor. We have "sell the tickets" logic in
complete_checkout
. Move this to a separate helper function so that both the free ticket purchase path and paid ticket purchase path can use this shared function.We also need one more refactor: the response returned should indicate that the tickets have been sold and the frontend doesn't need to call
complete_checkout
. This will require changing the response schema.The text was updated successfully, but these errors were encountered: