summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-08-20 11:22:39 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-08-20 11:22:39 -0600
commit78bdaeccf96777228b7a1cae6fc558af8c82df9a (patch)
tree2ded9766a24c54b14dc80361b7b6126bf03aac77
parenta556569dbb2ed8d23afeada43528388986140814 (diff)
downloadaskbot-78bdaeccf96777228b7a1cae6fc558af8c82df9a.tar.gz
askbot-78bdaeccf96777228b7a1cae6fc558af8c82df9a.tar.bz2
askbot-78bdaeccf96777228b7a1cae6fc558af8c82df9a.zip
fixed validation error with the question body editor field
-rw-r--r--askbot/forms.py5
1 files changed, 4 insertions, 1 deletions
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`