From a5efa93b93d9f31c787336905f4e4f4c11b68190 Mon Sep 17 00:00:00 2001 From: Bhumi Patel Date: Mon, 14 Jul 2014 11:01:57 +0530 Subject: [PATCH] [FIX] website_forum: prevent crash when no country Closes #1171 --- addons/website_forum/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index 89c4a33ed54..b3b0d243de7 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -592,7 +592,7 @@ class WebsiteForum(http.Controller): 'website': kwargs.get('website'), 'email': kwargs.get('email'), 'city': kwargs.get('city'), - 'country_id': int(kwargs.get('country')), + 'country_id': int(kwargs.get('country')) if kwargs.get('country') else False, 'website_description': kwargs.get('description'), }, context=request.context) return werkzeug.utils.redirect("/forum/%s/user/%d" % (slug(forum), user.id))