pwa: force json request to be read as text (#35425)
This commit is contained in:
parent
841d338970
commit
5bb06f8200
|
@ -87,7 +87,7 @@ def subscribe_push(request, *args, **kwargs):
|
|||
return HttpResponseForbidden()
|
||||
if request.method != 'POST':
|
||||
return HttpResponseForbidden()
|
||||
subscription_data = json.loads(request.body)
|
||||
subscription_data = json.loads(force_text(request.body))
|
||||
if subscription_data is None:
|
||||
PushSubscription.objects.filter(user=request.user).delete()
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue