web/form.py
branchstable
changeset 4779 dce36da37d40
parent 4719 aaed3f813ef8
child 5223 6abd6e3599f4
child 5367 4176a50c81c9
--- 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']