diff options
| author | Jeremy Kersten <jke@odoo.com> | 2021-01-11 11:35:22 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2021-01-11 11:41:56 +0000 |
| commit | 16d3427f17493bf7bacdee85b255476f93747d35 (patch) | |
| tree | dda8e3aa661fa62938f472705143a0342a51cbef /addons/http_routing | |
| parent | 9e9db5d0e9af81da8f89b38a5dc8c01fe3052252 (diff) | |
[FIX] website: fix url_for when no qs
Before this commit, old url was not rewrited in case you don't have any query
string.
Diffstat (limited to 'addons/http_routing')
| -rw-r--r-- | addons/http_routing/models/ir_http.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/http_routing/models/ir_http.py b/addons/http_routing/models/ir_http.py index 206d63f429e..cd6a80615eb 100644 --- a/addons/http_routing/models/ir_http.py +++ b/addons/http_routing/models/ir_http.py @@ -194,7 +194,7 @@ def url_for(url_from, lang_code=None, no_rewrite=False): and not path.startswith('/web/') )): new_url = request.env['ir.http'].url_rewrite(path) - new_url = new_url and qs and new_url + '?%s' % qs + new_url = new_url if not qs else new_url + '?%s' % qs return url_lang(new_url or url_from, lang_code=lang_code) |
