[server/session] ensure appobject obtained from the session are linked to the session
--- a/server/session.py Tue Jun 25 12:25:52 2013 +0200
+++ b/server/session.py Tue Jun 25 14:04:46 2013 +0200
@@ -919,7 +919,10 @@
This is to be used by session"""
def meth_from_cnx(session, *args, **kwargs):
- return getattr(session._cnx, meth_name)(*args, **kwargs)
+ result = getattr(session._cnx, meth_name)(*args, **kwargs)
+ if getattr(result, '_cw', None) is not None:
+ result._cw = session
+ return result
return meth_from_cnx
class Timestamp(object):