Skip to content

Commit

Permalink
[FIX] runbot: Fix csrf error in rebuild method
Browse files Browse the repository at this point in the history
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 odoo#84
  • Loading branch information
moylop260 authored and mart-e committed Oct 22, 2015
1 parent 0271ce0 commit 1e2d4bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runbot/runbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ def build(self, build_id=None, search=None, **post):
#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)])
Expand Down

0 comments on commit 1e2d4bf

Please sign in to comment.