SVN: r25766 - trunk/quixote/form
"Roger E. Masse" <rmasse-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Fri, 17 Dec 2004 19:09:42 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: rmasse
Date: 2004-12-14 16:31:22 -0500 (Tue, 14 Dec 2004)
New Revision: 25766
Modified:
trunk/quixote/form/form.py
Log:
Send the programmer a message if clear_errors is called before the form
is submitted. Without this check, it's possible for clear_errors to
set self.value to None. ...which is probably a surprising side effect.
Modified: trunk/quixote/form/form.py
===================================================================
--- trunk/quixote/form/form.py 2004-12-14 19:32:38 UTC (rev 25765)
+++ trunk/quixote/form/form.py 2004-12-14 21:31:22 UTC (rev 25766)
@@ -190,6 +190,7 @@
"""Ensure that all components of the form have parsed themselves.
Clear any errors that might have occured during parsing.
"""
+ assert self.is_submitted()
request = get_request()
for widget in self.get_all_widgets():
widget.clear_error(request)