From 412fedce674aa4586c123e729dc4c1da16346399 Mon Sep 17 00:00:00 2001 From: Nicolas Deram Date: Wed, 15 Sep 2010 16:12:55 +0200 Subject: [PATCH 1/2] products: fix get_price_with_tax for empty prices. --- products/product.py | 2 ++ 1 file changed, 2 insertions(+) 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: From 0f3416530f8fedb8512a8960d082ced441efef0d Mon Sep 17 00:00:00 2001 From: Nicolas Deram Date: Mon, 18 Jun 2012 18:27:40 +0200 Subject: [PATCH 2/2] update: clear authenticate param is deprecated --- shop_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)