# HG changeset patch # User Sylvain Thénault # Date 1259311018 -3600 # Node ID 25d5830b953182209da66e1ec96655805f48fbd9 # Parent 4347654979e825a7213f4b4e624e6de7dbec9903 force_session_key default to None diff -r 4347654979e8 -r 25d5830b9531 web/form.py --- a/web/form.py Fri Nov 27 09:36:42 2009 +0100 +++ b/web/form.py Fri Nov 27 09:36:58 2009 +0100 @@ -48,10 +48,9 @@ """return the key that may be used to store / retreive data about a previous post which failed because of a validation error """ - try: - return self.force_session_key - except AttributeError: + if self.force_session_key is None: return '%s#%s' % (self.req.url(), self.domid) + return self.force_session_key def restore_previous_post(self, sessionkey): # get validation session data which may have been previously set.