fix: Prevent multi pass in restore_previous_post
by adding a conditional return add the top of the methode.
--- a/web/form.py Thu Mar 04 08:48:51 2010 +0100
+++ b/web/form.py Thu Mar 04 08:50:03 2010 +0100
@@ -186,6 +186,11 @@
# deleting validation errors here breaks form reloading (errors are
# no more available), they have to be deleted by application's publish
# method on successful commit
+ if hasattr(self, '_form_previous_values'):
+ # XXX behaviour changed in 3.6.1, warn
+ warn('[3.6.1] restore_previous_post already called, remove this call',
+ DeprecationWarning, stacklevel=2)
+ return
forminfo = self._cw.get_session_data(sessionkey, pop=True)
if forminfo:
self._form_previous_values = forminfo['values']