zope.session storage error
Simon Elbaz <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <CAPOUM=dMQ4y02NyN+Df2gbMQv_q-k6Uvc-z9U_5UtiyjPpG7UA@mail.gmail.com> |
Hi,
Could someone explain me why the following code:
if
ISession(self.request)['cdc_adama'].__contains__('current_customer'):
ISession(self.request)['cdc_adama'].__delitem__('current_customer')
ISession(self.request)['cdc_adama']['current_customer'] =
customer
triggers the error:
File
"/home/simon/ADAMA/Src/gui/z3c_dunning/eggs/ZODB-4.0.0a4-py2.7.egg/ZODB/serialize.py",
line 352, in persistent_id
"database connection", self._jar, obj,
InvalidObjectReference: ('Attempt to store an object from a foreign
database connection', <Connection at 7966348c>,
<zope.container.btree.BTreeContainer object at 0x7a61282c>)
Is the zope.session module opening a new ZODB connection ?
Thanks for your explanation
Simon Elbaz
_______________________________________________
Zope-Dev maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )