[FIX] incorrect newapi migration in website_blog
Leads to the Duplicate link (when editing a blog post in website) yielding a 500 Internal Error instead of duplicating the blog post. OPW-740308 Fixes #16511
This commit is contained in:
@@ -322,7 +322,7 @@ class WebsiteBlog(http.Controller):
|
||||
|
||||
:return redirect to the new blog created
|
||||
"""
|
||||
new_blog_post = request.env['blog.post'].with_context(mail_create_nosubscribe=True).copy(int(blog_post_id), {})
|
||||
new_blog_post = request.env['blog.post'].with_context(mail_create_nosubscribe=True).browse(int(blog_post_id)).copy()
|
||||
return werkzeug.utils.redirect("/blog/%s/post/%s?enable_editor=1" % (slug(new_blog_post.blog_id), slug(new_blog_post)))
|
||||
|
||||
@http.route('/blog/post_get_discussion/', type='json', auth="public", website=True)
|
||||
|
||||
Reference in New Issue
Block a user