mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +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')
|
data = data.decode('utf-8')
|
||||||
return json.loads(data)
|
return json.loads(data)
|
||||||
else:
|
else:
|
||||||
json.dumps(data)
|
data = json.dumps(data)
|
||||||
except (TypeError, ValueError):
|
except (TypeError, ValueError):
|
||||||
self.fail('invalid')
|
self.fail('invalid')
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user