summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/widgets.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index f5d32586c..4efb4c3fb 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -136,8 +136,11 @@ class Select2Multiple(forms.SelectMultiple):
if self.remote in ('None', 'false'):
# test on lazy object is buggy... so we have this ugly test
self.remote = None
- if not choices and not self.remote and self.model:
- choices = self.get_choices()
+ if not choices:
+ if not self.remote and self.model:
+ choices = self.get_choices()
+ if hasattr(self, 'choices') and self.choices:
+ choices = self.choices
new_attrs = self.attrs.copy()
new_attrs.update(attrs)
attrs = new_attrs