Permalink
Browse files

fix saving json_field content in admin

  • Loading branch information...
1 parent 6fcc489 commit abd7f4b1ed130a689256e851068901c0a8130609 Frol committed Apr 29, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 quering_jsonfield/fields.py
@@ -9,7 +9,8 @@ class JSONField(models.TextField):
def to_python(self, value):
if value:
- value = JSONDict(json.loads(value))
+ if not isinstance(value, JSONDict):
+ value = JSONDict(json.loads(value))
else:
value = JSONDict()
return value

0 comments on commit abd7f4b

Please sign in to comment.