diff options
Diffstat (limited to 'ishtar_common/widgets.py')
| -rw-r--r-- | ishtar_common/widgets.py | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 95b51ffb4..5853c9675 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -224,6 +224,10 @@ class Select2Base(Select2Media):              else:                  attrs['style'] = "width: 370px" +        if value: +            if type(value) not in (list, tuple): +                value = value.split(',') +          options = ""          if self.remote:              options = """{ @@ -248,8 +252,6 @@ class Select2Base(Select2Media):              }""" % self.remote              if value:                  choices = [] -                if type(value) not in (list, tuple): -                    value = value.split(',')                  for v in value:                      try:                          choices.append((v, self.model.objects.get(pk=v)))  | 
