Verified Commit b52244b1 authored by Oliver Falk's avatar Oliver Falk
Browse files

We also need to handle 'text/html' this way

parent a346bc62
Pipeline #2073 passed with stage
in 7 minutes and 39 seconds
......@@ -412,7 +412,7 @@ class StatsView(TemplateView, JsonResponse):
# JSON of course return json, but also normal web requests default to JSON
if request.content_type == 'application/json' or request.content_type == 'text/plain':
if request.content_type in ('application/json', 'text/plain', 'text/html'):
return JsonResponse(retval)
return HttpResponseRedirect(reverse_lazy('home'))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment