to_python returns list instead of None
This commit is contained in:
parent
c232d1776c
commit
9dd27b1b48
1 changed files with 1 additions and 0 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)
|
||||
|
|
Loading…
Reference in a new issue