lingo: force json request to be read as text (#35425)
This commit is contained in:
parent
f06322cf7a
commit
841d338970
|
@ -111,7 +111,7 @@ class AddBasketItemApiView(View):
|
|||
if not lingo_check_request_signature(request):
|
||||
return HttpResponseForbidden()
|
||||
|
||||
request_body = json.loads(self.request.body)
|
||||
request_body = json.loads(force_text(self.request.body))
|
||||
extra = request_body.get('extra', {})
|
||||
|
||||
if not 'amount' in request.GET and not 'amount' in request_body and \
|
||||
|
@ -204,7 +204,7 @@ class RemoveBasketItemApiView(View):
|
|||
if not lingo_check_request_signature(request):
|
||||
return HttpResponseForbidden()
|
||||
|
||||
request_body = json.loads(self.request.body)
|
||||
request_body = json.loads(force_text(self.request.body))
|
||||
|
||||
if not 'basket_item_id' in request_body:
|
||||
raise Exception('missing basket_item_id parameter')
|
||||
|
|
Loading…
Reference in New Issue