diefenbach / django-lfs

An online-shop based on Django
http://www.getlfs.com
BSD 3-Clause "New" or "Revised" License
622 stars 222 forks source link

get_active_packing_unit return value #126

Closed emilian closed 10 years ago

emilian commented 11 years ago

Take a look at the following code:

https://github.com/diefenbach/django-lfs/blob/master/lfs/catalog/models.py#L1813

Then take a look at the code when the cart is refreshed:

https://github.com/diefenbach/django-lfs/blob/master/lfs/cart/views.py#L423

The refresh cart function is expecting a a boolean return value, but instead the get_active_packing_unit method returns the actual value from the database (0, 2 or 3) which evaluates to true, even though the product is set to "no" (false).

emilian commented 11 years ago

This is also an issue with the get_active_base_price method as well:

https://github.com/diefenbach/django-lfs/blob/master/lfs/catalog/models.py#L899

diefenbach commented 10 years ago

Fixed by @pigletto