[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:
Moises Lopez 2015-10-18 18:39:37 -05:00 committed by Martin Trigaux
parent 3b5669bd01
commit 7a842e5e45

View File

@ -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)])