Permalink
Browse files

Fixed JSONField for Django 1.4 compatibility

  • Loading branch information...
1 parent 8ccdafd commit e92bda54754bb20cd6bc7042ef83c7a6fd018c10 @spookylukey committed Apr 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 campaign/fields.py
View
@@ -31,11 +31,11 @@ def to_python(self, value):
value = simplejson.loads(value)
return value
- def get_db_prep_save(self, value):
+ def get_db_prep_save(self, value, connection):
if value is None: return
return simplejson.dumps(value)
def value_to_string(self, obj):
value = self._get_val_from_obj(obj)
return self.get_db_prep_value(value)
-
+

0 comments on commit e92bda5

Please sign in to comment.