[session] Ensure access to rql varmaker always mark the session as dirty 3.22
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 06 Jul 2016 20:14:55 +0200
branch3.22
changeset 11440 8388b37720e1
parent 11439 8d22200d174b
child 11441 2576d295c66d
[session] Ensure access to rql varmaker always mark the session as dirty When one accesses the rql_varmaker, that's usually to use it. The pb was that when the varmaker was already in page's data (which is stored as session data), session storage such as redis won't see that the session data is dirty and has to be stored back at the end of the request. To fix this, systematically call set_page_data. (grafted from 3432f0e2540d)
web/request.py
--- a/web/request.py	Wed Mar 16 00:42:40 2016 +0100
+++ b/web/request.py	Wed Jul 06 20:14:55 2016 +0200
@@ -229,7 +229,7 @@
         varmaker = self.get_page_data('rql_varmaker')
         if varmaker is None:
             varmaker = rqlvar_maker()
-            self.set_page_data('rql_varmaker', varmaker)
+        self.set_page_data('rql_varmaker', varmaker)
         return varmaker
 
     # input form parameters management ########################################