From 9b489e9d7c015228d2b7a10cd1595de9fce7170c Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 26 Aug 2015 11:06:36 +0200 Subject: [PATCH] [FIX] website_sale: deleted category on website product page Product pages ulrs can be indexed by searches engines. The product category can be included in the url. If the category has been deleted, accessing this page should still work anyway opw-648008 --- addons/website_sale/controllers/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 1f1170c2ca9..e45f4031db6 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -241,6 +241,7 @@ class website_sale(http.Controller): if category: category = category_obj.browse(cr, uid, int(category), context=context) + category = category if category.exists() else False attrib_list = request.httprequest.args.getlist('attrib') attrib_values = [map(int,v.split("-")) for v in attrib_list if v]