Fix #1 now works if the first composant of the list of tuple is an integer

This commit is contained in:
Pablo Martín 2013-11-19 19:29:20 +01:00
parent 16e56f6177
commit bdf660c561
1 changed files with 2 additions and 5 deletions

View File

@ -45,12 +45,9 @@ def add_metaclass(metaclass):
return wrapper
class MultiSelectField(models.Field):
class MultiSelectField(models.CharField):
""" Choice values can not contain commas. """
def get_internal_type(self):
return "CharField"
def get_choices_default(self):
return self.get_choices(include_blank=False)
@ -59,7 +56,7 @@ class MultiSelectField(models.Field):
return False
list = []
for choice_selected in arr_choices:
list.append(choice_selected[0])
list.append(string_type(choice_selected[0]))
return list
def _get_FIELD_display(self, field):