# HG changeset patch # User Alain Leufroy # Date 1267689003 -3600 # Node ID dce36da37d40b86bd717166bfcaff1259edcd93a # Parent e0f2ca89123f00a2d007344183af805c991b721c fix: Prevent multi pass in restore_previous_post by adding a conditional return add the top of the methode. diff -r e0f2ca89123f -r dce36da37d40 web/form.py --- 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']