mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot: avoid 404 errors in fast_launch url for odoo >= 9
Closes https://github.com/odoo/odoo-extra/pull/104
This commit is contained in:
parent
97001fbf72
commit
920c3edcee
@ -1554,8 +1554,14 @@ 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%s" %
|
branch = build.branch_id.branch_name
|
||||||
(last_build.domain, last_build.dest, "&redirect=/web?debug=1" if not build.branch_id.branch_name.startswith('7.0') else ''))
|
if branch.startswith('7'):
|
||||||
|
base_url = "http://%s/login?db=%s-all&login=admin&key=admin"
|
||||||
|
elif branch.startswith('8'):
|
||||||
|
base_url = "http://%s/login?db=%s-all&login=admin&key=admin&redirect=/web?debug=1"
|
||||||
|
else:
|
||||||
|
base_url = "http://%s/web/login?db=%s-all&login=admin&redirect=/web?debug=1"
|
||||||
|
url = base_url % (last_build.domain, last_build.dest)
|
||||||
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