From 341e1bd8927b406db9aec78a0d29cec84cba446b Mon Sep 17 00:00:00 2001 From: j Date: Fri, 12 Jan 2018 11:37:20 +0100 Subject: [PATCH] body is bytes --- pandora/oxdjango/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/oxdjango/api/views.py b/pandora/oxdjango/api/views.py index 6d431e8a8..92d4557c7 100644 --- a/pandora/oxdjango/api/views.py +++ b/pandora/oxdjango/api/views.py @@ -37,7 +37,7 @@ def api(request): response['Access-Control-Allow-Origin'] = '*' return response if request.META.get('CONTENT_TYPE') == 'application/json': - r = json.loads(request.body) + r = json.loads(request.body.decode('utf-8')) action = r['action'] data = r.get('data', {}) else: