From d41a1c47911a5bddef651a1365c1b0c066b1e654 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Tue, 2 Aug 2011 21:40:08 +0200 Subject: [PATCH] Fixed: parent form field is not required. --- openslides/agenda/forms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openslides/agenda/forms.py b/openslides/agenda/forms.py index 41b4a3d02..db33f8bbe 100644 --- a/openslides/agenda/forms.py +++ b/openslides/agenda/forms.py @@ -20,7 +20,7 @@ class ItemFormText(ModelForm): error_css_class = 'error' required_css_class = 'required' items = Item.objects.all().filter(parent=None).order_by('weight') - parent = ModelChoiceField(queryset=items, label=_("Parent item")) + parent = ModelChoiceField(queryset=items, label=_("Parent item"), required=False) class Meta: model = ItemText exclude = ('closed') @@ -30,7 +30,7 @@ class ItemFormApplication(ModelForm): error_css_class = 'error' required_css_class = 'required' items = Item.objects.all().filter(parent=None).order_by('weight') - parent = ModelChoiceField(queryset=items, label=_("Parent item")) + parent = ModelChoiceField(queryset=items, label=_("Parent item"), required=False) class Meta: model = ItemApplication @@ -41,7 +41,7 @@ class ItemFormPoll(ModelForm): error_css_class = 'error' required_css_class = 'required' items = Item.objects.all().filter(parent=None).order_by('weight') - parent = ModelChoiceField(queryset=items, label=_("Parent item")) + parent = ModelChoiceField(queryset=items, label=_("Parent item"), required=False) class Meta: model = ItemPoll @@ -52,7 +52,7 @@ class ItemFormAssignment(ModelForm): error_css_class = 'error' required_css_class = 'required' items = Item.objects.all().filter(parent=None).order_by('weight') - parent = ModelChoiceField(queryset=items, label=_("Parent item")) + parent = ModelChoiceField(queryset=items, label=_("Parent item"), required=False) class Meta: model = ItemAssignment