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:
Mahabubur Rahaman Melon 2018-08-13 17:57:51 +06:00 committed by GitHub
parent 90ed2c1ef7
commit 7b902523a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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