The snippet had a error. A function call to other function with less

parameters
This commit is contained in:
Pablo Martín 2012-09-27 17:57:02 +02:00
parent 1cc5ab5aae
commit 94cdfeae5a
3 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
0.0.2 (2012-09-27)
------------------
* Fix a error, the snippet had a error.
0.0.1 (2012-09-27)
------------------

View file

@ -10,7 +10,7 @@ def read(*rnames):
setup(
name="django-multiselectfield",
version="0.0.1",
version="0.0.2",
author="Daniel Roseman",
author_email="goinnn@gmail.com",
description="Django multiple select field",

View file

@ -29,7 +29,7 @@ class MultiSelectField(models.Field):
def value_to_string(self, obj):
value = self._get_val_from_obj(obj)
return self.get_db_prep_value(value)
return self.get_prep_value(value)
def validate(self, value, model_instance):
arr_choices = self.get_choices_selected(self.get_choices_default())
@ -46,7 +46,7 @@ class MultiSelectField(models.Field):
defaults.update(kwargs)
return MultiSelectFormField(**defaults)
def get_db_prep_value(self, value, connection, prepared=False):
def get_prep_value(self, value):
if isinstance(value, basestring):
return value
elif isinstance(value, list):