Fix JSON parse failure incase POST with no content is called. (#4743)
This commit is contained in:
parent
c6a188321a
commit
8d8358644c
1 changed files with 1 additions and 1 deletions
|
|
@ -123,7 +123,7 @@ def init_request(request):
|
|||
def make_form_dict(request):
|
||||
import json
|
||||
|
||||
if request.content_type == 'application/json':
|
||||
if request.content_type == 'application/json' and request.data:
|
||||
args = json.loads(request.data)
|
||||
else:
|
||||
args = request.form or request.args
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue