From 122418deb8f2226b3059445d6f4012c644de0f12 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 14 Oct 2020 10:24:05 -0700 Subject: [PATCH] wrong variable in byte check --- bookwyrm/incoming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/incoming.py b/bookwyrm/incoming.py index 042a524d8..0241fefb8 100644 --- a/bookwyrm/incoming.py +++ b/bookwyrm/incoming.py @@ -39,8 +39,8 @@ def shared_inbox(request): try: resp = request.body activity = json.loads(resp) - if isinstance(resp, str): - resp = json.loads(resp) + if isinstance(activity, str): + activity = json.loads(activity) activity_object = activity['object'] except (json.decoder.JSONDecodeError, KeyError): return HttpResponseBadRequest()