Skip to content

minor bug fix, keep db same from now on#4

Open
MediumSizedDeveloper wants to merge 1 commit intoAllenL8921:mainfrom
MediumSizedDeveloper:main
Open

minor bug fix, keep db same from now on#4
MediumSizedDeveloper wants to merge 1 commit intoAllenL8921:mainfrom
MediumSizedDeveloper:main

Conversation

@MediumSizedDeveloper
Copy link
Contributor

Problem: When adding to cart, item did not appear in cart page, neither did price. Minor logical ignorance in a if statement of add_to_cart_STATIC().

before:
if cart_item:
cart_item.quantity += 1

after:
if cart_item and item:
cart_item.quantity += 1

fix: check if the item to be added is BOTH alr an object of both Cart and Item classes.

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.

1 participant