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

Just default to sending JSON - everything else seems not to work correctly

parent b52244b1
Pipeline #2074 passed with stage
in 7 minutes and 10 seconds
......@@ -411,8 +411,4 @@ class StatsView(TemplateView, JsonResponse):
'openids': ConfirmedOpenId.objects.all().count(), # pylint: disable=no-member
}
# JSON of course return json, but also normal web requests default to JSON
if request.content_type in ('application/json', 'text/plain', 'text/html'):
return JsonResponse(retval)
return HttpResponseRedirect(reverse_lazy('home'))
return JsonResponse(retval)
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