mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 11:00:13 +03:00
Proper output is not return
def to_internal_value is not return data if binary=False and is_json_string=False
This commit is contained in:
parent
90ed2c1ef7
commit
7b902523a7
|
@ -1783,7 +1783,7 @@ class JSONField(Field):
|
|||
data = data.decode('utf-8')
|
||||
return json.loads(data)
|
||||
else:
|
||||
json.dumps(data)
|
||||
data = json.dumps(data)
|
||||
except (TypeError, ValueError):
|
||||
self.fail('invalid')
|
||||
return data
|
||||
|
|
Loading…
Reference in New Issue
Block a user