diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-17 12:48:26 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-17 19:46:08 +0100 |
commit | c21edc6c6ec4838a44e4e4110ba2244bee5754e6 (patch) | |
tree | caf5e1967285027a05f6458315c7aecd67220402 /ishtar_common/widgets.py | |
parent | 68d6310f529279a00b9c86df6d40a44759f7c124 (diff) | |
download | Ishtar-c21edc6c6ec4838a44e4e4110ba2244bee5754e6.tar.bz2 Ishtar-c21edc6c6ec4838a44e4e4110ba2244bee5754e6.zip |
🐛 bulk update form: fix add button with new permissions
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) |