Commit 41ed1033 authored by Nicolas Dumazet's avatar Nicolas Dumazet

And explicitely disallow pickling temporary objects to fix TestERP5Type.test_03


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43007 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d94d7da3
......@@ -26,6 +26,7 @@
#
##############################################################################
from cPickle import PicklingError
from Acquisition import aq_base
from Products.ERP5Type.Accessor.Constant import PropertyGetter as \
PropertyConstantGetter
......@@ -38,6 +39,10 @@ class TemporaryDocumentMixin(object):
isTempDocument = PropertyConstantGetter('isTempDocument', value=True)
__roles__ = None
def __getstate__(self):
# disallow persistent storage
raise PicklingError("Temporary objects can't be pickled")
def reindexObject(self, *args, **kw):
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment