[WEB-4008] fix: handle when settings are None #7016
https://app.plane.so/plane/browse/WEB-4008/
This commit is contained in:
parent
b435ceedfc
commit
26c8cba322
2 changed files with 12 additions and 4 deletions
|
|
@ -21,7 +21,9 @@ def base_host(
|
||||||
|
|
||||||
# Admin redirection
|
# Admin redirection
|
||||||
if is_admin:
|
if is_admin:
|
||||||
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", "/god-mode/")
|
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", None)
|
||||||
|
if not isinstance(admin_base_path, str):
|
||||||
|
admin_base_path = "/god-mode/"
|
||||||
if not admin_base_path.startswith("/"):
|
if not admin_base_path.startswith("/"):
|
||||||
admin_base_path = "/" + admin_base_path
|
admin_base_path = "/" + admin_base_path
|
||||||
if not admin_base_path.endswith("/"):
|
if not admin_base_path.endswith("/"):
|
||||||
|
|
@ -34,7 +36,9 @@ def base_host(
|
||||||
|
|
||||||
# Space redirection
|
# Space redirection
|
||||||
if is_space:
|
if is_space:
|
||||||
space_base_path = getattr(settings, "SPACE_BASE_PATH", "/spaces/")
|
space_base_path = getattr(settings, "SPACE_BASE_PATH", None)
|
||||||
|
if not isinstance(space_base_path, str):
|
||||||
|
space_base_path = "/spaces/"
|
||||||
if not space_base_path.startswith("/"):
|
if not space_base_path.startswith("/"):
|
||||||
space_base_path = "/" + space_base_path
|
space_base_path = "/" + space_base_path
|
||||||
if not space_base_path.endswith("/"):
|
if not space_base_path.endswith("/"):
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,9 @@ def base_host(
|
||||||
|
|
||||||
# Admin redirection
|
# Admin redirection
|
||||||
if is_admin:
|
if is_admin:
|
||||||
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", "/god-mode/")
|
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", None)
|
||||||
|
if not isinstance(admin_base_path, str):
|
||||||
|
admin_base_path = "/god-mode/"
|
||||||
if not admin_base_path.startswith("/"):
|
if not admin_base_path.startswith("/"):
|
||||||
admin_base_path = "/" + admin_base_path
|
admin_base_path = "/" + admin_base_path
|
||||||
if not admin_base_path.endswith("/"):
|
if not admin_base_path.endswith("/"):
|
||||||
|
|
@ -38,7 +40,9 @@ def base_host(
|
||||||
|
|
||||||
# Space redirection
|
# Space redirection
|
||||||
if is_space:
|
if is_space:
|
||||||
space_base_path = getattr(settings, "SPACE_BASE_PATH", "/spaces/")
|
space_base_path = getattr(settings, "SPACE_BASE_PATH", None)
|
||||||
|
if not isinstance(space_base_path, str):
|
||||||
|
space_base_path = "/spaces/"
|
||||||
if not space_base_path.startswith("/"):
|
if not space_base_path.startswith("/"):
|
||||||
space_base_path = "/" + space_base_path
|
space_base_path = "/" + space_base_path
|
||||||
if not space_base_path.endswith("/"):
|
if not space_base_path.endswith("/"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue