force_session_key default to None stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 27 Nov 2009 09:36:58 +0100
branchstable
changeset 3925 25d5830b9531
parent 3924 4347654979e8
child 3926 0585694c1896
force_session_key default to None
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.