connection has to be named argument
This commit is contained in:
parent
076020bd84
commit
d35a1c721c
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ class DictField(models.TextField):
|
||||||
"""Convert our JSON object to a string before we save"""
|
"""Convert our JSON object to a string before we save"""
|
||||||
assert isinstance(value, dict)
|
assert isinstance(value, dict)
|
||||||
value = json.dumps(value, default=to_json)
|
value = json.dumps(value, default=to_json)
|
||||||
return super(DictField, self).get_db_prep_save(value, connection)
|
return super(DictField, self).get_db_prep_save(value, connection=connection)
|
||||||
|
|
||||||
class TupleField(models.TextField):
|
class TupleField(models.TextField):
|
||||||
"""TupleField is a textfield that contains JSON-serialized tuples."""
|
"""TupleField is a textfield that contains JSON-serialized tuples."""
|
||||||
|
@ -77,7 +77,7 @@ class TupleField(models.TextField):
|
||||||
"""Convert our JSON object to a string before we save"""
|
"""Convert our JSON object to a string before we save"""
|
||||||
assert isinstance(value, tuple)
|
assert isinstance(value, tuple)
|
||||||
value = json.dumps(value, default=to_json)
|
value = json.dumps(value, default=to_json)
|
||||||
return super(TupleField, self).get_db_prep_save(value, connection)
|
return super(TupleField, self).get_db_prep_save(value, connection=connection)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from south.modelsinspector import add_introspection_rules
|
from south.modelsinspector import add_introspection_rules
|
||||||
|
|
Loading…
Reference in a new issue