From a823519cdf49130889bd4ef9825f6004e8042717 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Mon, 14 Jul 2014 12:09:00 +0200 Subject: [PATCH] [FIX] preparation for v8 (fix various issues) --- runbot/runbot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index eb31a14f..40f8666b 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -458,7 +458,7 @@ class runbot_build(osv.osv): _logger.debug(*l) def list_jobs(self): - jobs = [job for job in dir(self) if job.startswith('job')] + jobs = [job for job in dir(self) if re.match(r'^job_\d+', job)] jobs.sort() return jobs @@ -882,10 +882,11 @@ class RunbotController(http.Controller): branch_ids.append(br[0]) branches = branch_obj.browse(cr, uid, branch_ids, context=context) + v['branches'] = [] for branch in branches: build_ids = build_obj.search(cr, uid, [('branch_id','=',branch.id)], limit=4) branch.builds = build_obj.browse(cr, uid, build_ids, context=context) - v['branches'] = branches + v['branches'].append(branch) # stats v['testing'] = build_obj.search_count(cr, uid, [('repo_id','=',repo.id), ('state','=','testing')])