Fix fallback for instance API host

Fixes #522
This commit is contained in:
Andrew Godwin 2023-03-03 15:04:13 -07:00
parent 78eacf165e
commit bd6d1ae8de
1 changed files with 1 additions and 3 deletions

View File

@ -59,9 +59,7 @@ def instance_info_v2(request) -> dict:
request.headers.get("host", settings.SETUP.MAIN_DOMAIN) request.headers.get("host", settings.SETUP.MAIN_DOMAIN)
) )
if current_domain is None or not current_domain.local: if current_domain is None or not current_domain.local:
current_domain = Domain.get_domain( current_domain = Domain.get_domain(settings.SETUP.MAIN_DOMAIN)
request.headers.get(settings.SETUP.MAIN_DOMAIN)
)
if current_domain is None: if current_domain is None:
raise ValueError("No domain set up for MAIN_DOMAIN") raise ValueError("No domain set up for MAIN_DOMAIN")
admin_identity = ( admin_identity = (