diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-05-27 12:16:40 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-05-27 12:16:40 +0200 |
commit | 9fe603b08813a2a0f95a5f2db702dac66adb4e15 (patch) | |
tree | 2b3f1b15de0c4bb33a3a10757b75271e16127364 /chimere/forms.py | |
parent | 9e477fbeb6e9fb811968f31f937df5877b816aa7 (diff) | |
download | Chimère-9fe603b08813a2a0f95a5f2db702dac66adb4e15.tar.bz2 Chimère-9fe603b08813a2a0f95a5f2db702dac66adb4e15.zip |
Check that an action available and redirect
Diffstat (limited to 'chimere/forms.py')
-rw-r--r-- | chimere/forms.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/chimere/forms.py b/chimere/forms.py index e9239a0..e17e3c9 100644 --- a/chimere/forms.py +++ b/chimere/forms.py @@ -296,8 +296,7 @@ class MarkerAdminFormBase(forms.ModelForm): self.fields['end_date'].widget = DatePickerWidget() if subcategories: self.fields['categories'].choices = subcategories - elif hasattr(self, 'categories_choices'): - self.fields['categories'].choices = self.categories_choices + self.fields['categories'].choices = [] # auto select if there is only one category choices = list(self.fields['categories'].choices) self.fields['categories'].choices = choices |