Commit 3005eb49 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web: base url does't always start with root url

parent 0fb3836d
...@@ -252,8 +252,10 @@ else: ...@@ -252,8 +252,10 @@ else:
root_url = base_url_root_object.absolute_url() root_url = base_url_root_object.absolute_url()
base_url = base_url_object.absolute_url() base_url = base_url_object.absolute_url()
assert base_url_object.getRelativeUrl().startswith(base_url_root_object.getRelativeUrl()) if base_url_object.getRelativeUrl().startswith(base_url_root_object.getRelativeUrl()):
base_path = base_url_object.getRelativeUrl()[len(base_url_root_object.getRelativeUrl()):] base_path = base_url_object.getRelativeUrl()[len(base_url_root_object.getRelativeUrl()):]
else:
base_path = base_url_object.getRelativeUrl()
if not base_path.startswith("/"): if not base_path.startswith("/"):
base_path = "/" + base_path base_path = "/" + base_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment