diff --git a/products/product.py b/products/product.py index 4e9e35e..11492ae 100644 --- a/products/product.py +++ b/products/product.py @@ -837,6 +837,8 @@ def get_price_with_tax(self, id_declination=None, with_reduction=True, pretty=False, prefix=None): price = self.get_price_without_tax(id_declination, with_reduction=with_reduction, prefix=prefix) + if price is None: + return '' price = price * self.get_tax_value(prefix=prefix) # Format price if pretty is True: diff --git a/shop_views.py b/shop_views.py index e51fca6..3786375 100644 --- a/shop_views.py +++ b/shop_views.py @@ -512,7 +512,7 @@ def action(self, resource, context, form): return context.come_back(message, goto) # Check the password is right - if not user.authenticate(password, clear=True): + if not user.authenticate(password): message = ERROR(u'The password is wrong.') goto = context.get_referrer() return context.come_back(message, goto)