]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/forms.py
OSQA-141:
[osqa.git] / forum / forms.py
index 77430efd777766d4a40dbf0a3db779b2e387d4a3..35c6083a8a0732668631d740c83cff46b212dcc0 100644 (file)
@@ -38,7 +38,7 @@ class EditorField(forms.CharField):
         self.initial = ''
 
     def clean(self, value):
         self.initial = ''
 
     def clean(self, value):
-        if len(value) < settings.FORM_MIN_QUESTION_BODY:
+        if len(value) < settings.FORM_MIN_QUESTION_BODY and not settings.FORM_EMPTEY_QUESTION_BODY:
             raise forms.ValidationError(_('question content must be must be at least %s characters' % settings.FORM_MIN_QUESTION_BODY))
 
         return value
             raise forms.ValidationError(_('question content must be must be at least %s characters' % settings.FORM_MIN_QUESTION_BODY))
 
         return value