[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:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user