[FIX] website_forum: set return content-type
The request being of type http, the returned Content-Type was text/html while the select2 request exepected json in the dataType
This commit is contained in:
@@ -185,7 +185,10 @@ class WebsiteForum(WebsiteProfile):
|
||||
fields=['id', 'name'],
|
||||
limit=int(limit),
|
||||
)
|
||||
return json.dumps(data)
|
||||
return request.make_response(
|
||||
json.dumps(data),
|
||||
headers=[("Content-Type", "application/json")]
|
||||
)
|
||||
|
||||
@http.route(['/forum/<model("forum.forum"):forum>/tag', '/forum/<model("forum.forum"):forum>/tag/<string:tag_char>'], type='http', auth="public", website=True, sitemap=False)
|
||||
def tags(self, forum, tag_char=None, **post):
|
||||
|
||||
Reference in New Issue
Block a user