web/form.py
branchstable
changeset 3925 25d5830b9531
parent 3923 be05eeeb2db1
child 3998 94cc7cad3d2d
child 4212 ab6573088b4a
--- 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.