diff options
Diffstat (limited to 'ishtar_common/widgets.py')
| -rw-r--r-- | ishtar_common/widgets.py | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 414cd7eab..765ed7b77 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -724,6 +724,11 @@ class JQueryAutoComplete(forms.TextInput):          self.multiple = multiple          self.limit = limit or {}          self.dynamic_limit = dynamic_limit or [] +        if (self.new or self.modify) and not self.associated_model: +            raise AttributeError( +                "JQueryAutoComplete - associated_model must be defined if new or " +                "modify are set to True" +            )      def value_from_datadict(self, data, files, name):          v = data.get(name, None) | 
