summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-05-31 01:38:32 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-05-31 01:38:32 -0400
commit325bf8109e6f09c3d4ea45c2bbb60bd773587fcb (patch)
treeaedbe80a590f025d00841ce5141a16dd0dc3006f
parentacbbbe0abf318a2ff7d941def244e656a628237b (diff)
downloadaskbot-325bf8109e6f09c3d4ea45c2bbb60bd773587fcb.tar.gz
askbot-325bf8109e6f09c3d4ea45c2bbb60bd773587fcb.tar.bz2
askbot-325bf8109e6f09c3d4ea45c2bbb60bd773587fcb.zip
added clear errors block in the ShowQuestionForm
-rw-r--r--askbot/forms.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/askbot/forms.py b/askbot/forms.py
index 523c76a0..c5b1083e 100644
--- a/askbot/forms.py
+++ b/askbot/forms.py
@@ -259,6 +259,11 @@ class ShowQuestionForm(forms.Form):
"""this form must always be valid
should use defaults if the data is incomplete
or invalid"""
+ if self._errors:
+ #since the form is always valid, clear the errors
+ logging.error(str(self._errors))
+ self._errors = {}
+
in_data = self.get_pruned_data()
out_data = dict()
if ('answer' in in_data) ^ ('comment' in in_data):