Merge pull request #32 from danilogbotelho/master

to_python returns list instead of None
This commit is contained in:
blag 2016-09-22 03:21:58 -06:00 committed by GitHub
commit 254325159d
2 changed files with 2 additions and 1 deletions

View file

@ -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)

View file

@ -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",