From 78bdaeccf96777228b7a1cae6fc558af8c82df9a Mon Sep 17 00:00:00 2001 From: Adolfo Fitoria Date: Mon, 20 Aug 2012 11:22:39 -0600 Subject: fixed validation error with the question body editor field --- askbot/forms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/askbot/forms.py b/askbot/forms.py index 57b14550..fe344c07 100644 --- a/askbot/forms.py +++ b/askbot/forms.py @@ -893,7 +893,7 @@ class AskWidgetForm(forms.Form, FormWithHideableFields): '''Simple form with just the title to ask a question''' title = TitleField() - text = EditorField(required=False) + text = EditorField() ask_anonymously = forms.BooleanField( label=_('ask anonymously'), help_text=_( @@ -911,6 +911,9 @@ class AskWidgetForm(forms.Form, FormWithHideableFields): if not include_text: self.hide_field('text') + self.fields['text'].required=False + else: + self.fields['text'].min_length = askbot_settings.MIN_QUESTION_BODY_LENGTH class AskByEmailForm(forms.Form): """:class:`~askbot.forms.AskByEmailForm` -- cgit v1.2.3-1-g7c22