Fixed 500 error when federation is disabled and application+json is requested

This commit is contained in:
Agate 2020-04-22 08:03:59 +02:00
parent 3300634297
commit fdeb5ef8ae
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
1 changed files with 2 additions and 1 deletions

View File

@ -204,7 +204,8 @@ def get_api_response(request, url):
except urls.exceptions.Resolver404:
return http.HttpResponseNotFound()
response = match.func(request, *match.args, **match.kwargs)
response.render()
if hasattr(response, "render"):
response.render()
return response