Permalink
Browse files

Added connection argument to custom database fields which gave a depr…

…ecation warning in Django 1.3.
  • Loading branch information...
1 parent 73a2cc3 commit 6815f48b531290857601f90b35f79ee65498df6b @joeribekker committed Jun 20, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 djangologdb/utils.py
View
@@ -32,12 +32,12 @@ def to_python(self, value):
return value
- def get_db_prep_save(self, value):
+ def get_db_prep_save(self, value, connection):
if value is None:
return None
value = json.dumps(value, cls=DjangoJSONEncoder)
- return super(JSONField, self).get_db_prep_save(value)
+ return super(JSONField, self).get_db_prep_save(value, connection=connection)
class TupleField(models.TextField):
@@ -55,9 +55,9 @@ def to_python(self, value):
return value
- def get_db_prep_save(self, value):
+ def get_db_prep_save(self, value, connection):
if value is None:
return None
value = json.dumps(value, cls=DjangoJSONEncoder)
- return super(TupleField, self).get_db_prep_save(value)
+ return super(TupleField, self).get_db_prep_save(value, connection=connection)

0 comments on commit 6815f48

Please sign in to comment.