From 33304c77ec15157ec4a6ce8216f8d96ebd0ca3ff Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 27 May 2014 02:17:39 +0200 Subject: [PATCH] runbot change build url to use id --- runbot/runbot.py | 7 +++---- runbot/runbot.xml | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index dd3b7f89..7de2b2eb 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -802,12 +802,11 @@ class RunbotController(http.Controller): }) return request.render("runbot.repo", v) - @http.route(['/runbot/build/'], type='http', auth="public", website=True) - def build(self, sha=None, search=None, **post): + @http.route(['/runbot/build/'], type='http', auth="public", website=True) + def build(self, build_id=None, search=None, **post): registry, cr, uid, context = request.registry, request.cr, 1, request.context - build_ids = registry['runbot.build'].search(cr, uid, [('name', '=', sha)]) - build = registry['runbot.build'].browse(cr, uid, build_ids)[0] + build = registry['runbot.build'].browse(cr, uid, [int(build_id)])[0] # other builds build_ids = registry['runbot.build'].search(cr, uid, [('branch_id', '=', build.branch_id.id)]) diff --git a/runbot/runbot.xml b/runbot/runbot.xml index c6bae862..677e151c 100644 --- a/runbot/runbot.xml +++ b/runbot/runbot.xml @@ -215,7 +215,7 @@