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()
|
||||
return json.loads(data, cls=self.decoder)
|
||||
else:
|
||||
json.dumps(data, cls=self.encoder)
|
||||
data = json.dumps(data, cls=self.encoder)
|
||||
except (TypeError, ValueError):
|
||||
self.fail('invalid')
|
||||
return data
|
||||
|
|
Loading…
Reference in New Issue
Block a user