Merge pull request #32 from danilogbotelho/master
to_python returns list instead of None
This commit is contained in:
commit
254325159d
2 changed files with 2 additions and 1 deletions
|
@ -107,6 +107,7 @@ class MultiSelectField(models.CharField):
|
|||
def to_python(self, value):
|
||||
if value:
|
||||
return value if isinstance(value, list) else value.split(',')
|
||||
return []
|
||||
|
||||
def contribute_to_class(self, cls, name):
|
||||
super(MultiSelectField, self).contribute_to_class(cls, name)
|
||||
|
|
2
setup.py
2
setup.py
|
@ -25,7 +25,7 @@ def read(*rnames):
|
|||
|
||||
setup(
|
||||
name="django-multiselectfield",
|
||||
version="0.1.3",
|
||||
version="0.1.4",
|
||||
author="Pablo Martin",
|
||||
author_email="goinnn@gmail.com",
|
||||
description="Django multiple select field",
|
||||
|
|
Loading…
Reference in a new issue