[FIX] website_forum: prevent crash when no country

Closes #1171
This commit is contained in:
Bhumi Patel
2014-07-18 09:38:39 +02:00
committed by Richard Mathot
parent 49c203d6b9
commit a5efa93b93
+1 -1
View File
@@ -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))