summaryrefslogtreecommitdiff
path: root/chimere/forms.py
diff options
context:
space:
mode:
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
commit9fe603b08813a2a0f95a5f2db702dac66adb4e15 (patch)
tree2b3f1b15de0c4bb33a3a10757b75271e16127364 /chimere/forms.py
parent9e477fbeb6e9fb811968f31f937df5877b816aa7 (diff)
downloadChimè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.py3
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