Fix bug in middleware when domain config is None (#567)

This commit is contained in:
Karthik Balakrishnan 2023-05-04 23:29:11 +05:30 committed by GitHub
parent 7862795993
commit dbc25f538d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)