Fix bug in middleware when domain config is None (#567)
This commit is contained in:
parent
7862795993
commit
dbc25f538d
|
@ -18,7 +18,7 @@ from core.models import Config
|
||||||
def homepage(request):
|
def homepage(request):
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
return Home.as_view()(request)
|
return Home.as_view()(request)
|
||||||
elif request.domain.config_domain.single_user:
|
elif request.domain and request.domain.config_domain.single_user:
|
||||||
return redirect(f"/@{request.domain.config_domain.single_user}/")
|
return redirect(f"/@{request.domain.config_domain.single_user}/")
|
||||||
else:
|
else:
|
||||||
return About.as_view()(request)
|
return About.as_view()(request)
|
||||||
|
|
Loading…
Reference in New Issue