finish flake8 and pass choices to MSFList
This commit is contained in:
parent
dadfdaee12
commit
d6ad0115b7
1 changed files with 2 additions and 2 deletions
|
@ -144,8 +144,8 @@ class MultiSelectField(models.CharField):
|
|||
choices = dict(self.flatchoices)
|
||||
|
||||
if value:
|
||||
return value if isinstance(value, list) else MSFList(value.split(','))
|
||||
return MSFList([])
|
||||
return value if isinstance(value, list) else MSFList(choices, value.split(','))
|
||||
return MSFList(choices, [])
|
||||
|
||||
def from_db_value(self, value, expression, connection, context):
|
||||
if value is None:
|
||||
|
|
Loading…
Reference in a new issue