mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
FIX JSONField deserialize action
This commit is contained in:
parent
40eccb0d6c
commit
88df823cf2
|
@ -1779,7 +1779,7 @@ class JSONField(Field):
|
||||||
data = data.decode()
|
data = data.decode()
|
||||||
return json.loads(data, cls=self.decoder)
|
return json.loads(data, cls=self.decoder)
|
||||||
else:
|
else:
|
||||||
json.dumps(data, cls=self.encoder)
|
data = json.dumps(data, cls=self.encoder)
|
||||||
except (TypeError, ValueError):
|
except (TypeError, ValueError):
|
||||||
self.fail('invalid')
|
self.fail('invalid')
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user