Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply order_required on view_that_asks_for_money #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rfleschenberg
Copy link
Contributor

Hey Chris,
what do you think about this change? It fixes an issue I have when clients are randomly hitting the view_that_asks_for_money URL without having created an order before. The main drawback I see is that it introduces a hard depdency on two functions in django-shop. Would you be ok with merging it, or do you think the dependency should be avoided, or do you have other objections?

This view needs an order to work properly, otherwise it will cause an
AttributeError in the shop API when trying to get the order total via
get_order_total. Applying the order_required decorator fixes this by making
sure the client is redirected to the cart when there is no order on the
request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant