[FIX] website_forum: edit post with tags

Tags are lost when editing a post as we handle the wrong parameter.
Editing a post should not erase its tags anymore.
This commit is contained in:
Thibault Delavallée
2015-11-26 17:00:41 +01:00
parent 75534d358c
commit fa015c4c2e
+1 -1
View File
@@ -358,7 +358,7 @@ class WebsiteForum(http.Controller):
def post_save(self, forum, post, **kwargs):
if 'post_name' in kwargs and not kwargs.get('post_name').strip():
return request.website.render('website.http_error', {'status_code': _('Bad Request'), 'status_message': _('Title should not be empty.')})
post_tags = forum._tag_to_write_vals(kwargs.get('post_tag', ''))
post_tags = forum._tag_to_write_vals(kwargs.get('post_tags', ''))
vals = {
'tag_ids': post_tags,
'name': kwargs.get('post_name'),