From c5ae1d0375537f45a8625d6b7c7a3e7a786797e9 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Mon, 15 Dec 2014 14:31:46 +0100 Subject: [PATCH] [IMP] runbot: don't set debug mode if branch is 7.0 (don't supported by controller). Known issues: Pull request or branch with bad name for v7. --- runbot/runbot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index 685f4231..2fb66da7 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -1228,8 +1228,8 @@ class RunbotController(http.Controller): last_build = False for build in Build.browse(cr, uid, builds, context=context): if build.state in ['duplicate', 'running']: - last_build = build.state == 'running' and build or build.duplicate_id - break; + last_build = build if build.state == 'running' else build.duplicate_id + break if not last_build: # Find the last build regardless the state to propose a rebuild @@ -1238,8 +1238,8 @@ class RunbotController(http.Controller): if last_build.state != 'running': url = "/runbot/build/%s?ask_rebuild=1" % last_build.id else: - url = ("http://%s/login?db=%s-all&login=admin&key=admin&redirect=/web?debug=1" % - (last_build.domain, last_build.dest)) + url = ("http://%s/login?db=%s-all&login=admin&key=admin%s" % + (last_build.domain, last_build.dest, "&redirect=/web?debug=1" if not build.branch_id.branch_name.startswith('7.0') else '')) else: return request.not_found() return werkzeug.utils.redirect(url)