wrong variable in byte check

This commit is contained in:
Mouse Reeve 2020-10-14 10:24:05 -07:00
parent cdf23fce31
commit 122418deb8

View file

@ -39,8 +39,8 @@ def shared_inbox(request):
try: try:
resp = request.body resp = request.body
activity = json.loads(resp) activity = json.loads(resp)
if isinstance(resp, str): if isinstance(activity, str):
resp = json.loads(resp) activity = json.loads(activity)
activity_object = activity['object'] activity_object = activity['object']
except (json.decoder.JSONDecodeError, KeyError): except (json.decoder.JSONDecodeError, KeyError):
return HttpResponseBadRequest() return HttpResponseBadRequest()