summaryrefslogtreecommitdiff
path: root/chimere/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/forms.py')
-rw-r--r--chimere/forms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/chimere/forms.py b/chimere/forms.py
index e17e3c9..585cc85 100644
--- a/chimere/forms.py
+++ b/chimere/forms.py
@@ -294,9 +294,9 @@ class MarkerAdminFormBase(forms.ModelForm):
if settings.CHIMERE_DAYS_BEFORE_EVENT:
self.fields['start_date'].widget = DatePickerWidget()
self.fields['end_date'].widget = DatePickerWidget()
+ self.fields['categories'].choices = []
if subcategories:
self.fields['categories'].choices = subcategories
- self.fields['categories'].choices = []
# auto select if there is only one category
choices = list(self.fields['categories'].choices)
self.fields['categories'].choices = choices
@@ -468,6 +468,7 @@ class RouteAdminForm(forms.ModelForm):
if settings.CHIMERE_DAYS_BEFORE_EVENT:
self.fields['start_date'].widget = DatePickerWidget()
self.fields['end_date'].widget = DatePickerWidget()
+ self.fields['categories'].choices = []
if subcategories:
self.fields['categories'].choices = subcategories
# not a clean way to filter properties...