mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[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.
This commit is contained in:
parent
eb67bb79f4
commit
c5ae1d0375
@ -1228,8 +1228,8 @@ class RunbotController(http.Controller):
|
|||||||
last_build = False
|
last_build = False
|
||||||
for build in Build.browse(cr, uid, builds, context=context):
|
for build in Build.browse(cr, uid, builds, context=context):
|
||||||
if build.state in ['duplicate', 'running']:
|
if build.state in ['duplicate', 'running']:
|
||||||
last_build = build.state == 'running' and build or build.duplicate_id
|
last_build = build if build.state == 'running' else build.duplicate_id
|
||||||
break;
|
break
|
||||||
|
|
||||||
if not last_build:
|
if not last_build:
|
||||||
# Find the last build regardless the state to propose a rebuild
|
# Find the last build regardless the state to propose a rebuild
|
||||||
@ -1238,8 +1238,8 @@ class RunbotController(http.Controller):
|
|||||||
if last_build.state != 'running':
|
if last_build.state != 'running':
|
||||||
url = "/runbot/build/%s?ask_rebuild=1" % last_build.id
|
url = "/runbot/build/%s?ask_rebuild=1" % last_build.id
|
||||||
else:
|
else:
|
||||||
url = ("http://%s/login?db=%s-all&login=admin&key=admin&redirect=/web?debug=1" %
|
url = ("http://%s/login?db=%s-all&login=admin&key=admin%s" %
|
||||||
(last_build.domain, last_build.dest))
|
(last_build.domain, last_build.dest, "&redirect=/web?debug=1" if not build.branch_id.branch_name.startswith('7.0') else ''))
|
||||||
else:
|
else:
|
||||||
return request.not_found()
|
return request.not_found()
|
||||||
return werkzeug.utils.redirect(url)
|
return werkzeug.utils.redirect(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user