[FIX] website_forum: prevent crash when no country

Closes #1171
This commit is contained in:
Bhumi Patel 2014-07-14 11:01:57 +05:30 committed by Richard Mathot
parent 49c203d6b9
commit a5efa93b93
1 changed files with 1 additions and 1 deletions

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))