Fixes status code variable in http response

This commit is contained in:
Mouse Reeve 2021-09-10 08:59:18 -07:00
parent 718744a92d
commit 3a7717e22f

View file

@ -41,7 +41,7 @@ class CreateStatus(View):
return HttpResponseBadRequest() return HttpResponseBadRequest()
if not form.is_valid(): if not form.is_valid():
if is_api_request(request): if is_api_request(request):
return HttpResponse(status_code=500) return HttpResponse(status=500)
return redirect(request.headers.get("Referer", "/")) return redirect(request.headers.get("Referer", "/"))
status = form.save(commit=False) status = form.save(commit=False)