mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: Fix csrf error in rebuild method
Runbot is intended to be run on a 8.0 instance but if runs on a 9.0, CSRF needs to be disabled. Will not break on 8.0 code. Closes #84
This commit is contained in:
parent
3b5669bd01
commit
7a842e5e45
@ -1363,7 +1363,7 @@ class RunbotController(http.Controller):
|
||||
#context['level'] = level
|
||||
return request.render("runbot.build", context)
|
||||
|
||||
@http.route(['/runbot/build/<build_id>/force'], type='http', auth="public", methods=['POST'])
|
||||
@http.route(['/runbot/build/<build_id>/force'], type='http', auth="public", methods=['POST'], csrf=False)
|
||||
def build_force(self, build_id, **post):
|
||||
registry, cr, uid, context = request.registry, request.cr, request.uid, request.context
|
||||
repo_id = registry['runbot.build'].force(cr, uid, [int(build_id)])
|
||||
|
Loading…
Reference in New Issue
Block a user