Commit 7183994f authored by 's avatar

Added fix for ProductFolder with old bobobases

parent 3b64fa0a
__doc__="""System management components""" __doc__="""System management components"""
__version__='$Revision: 1.33 $'[11:-2] __version__='$Revision: 1.34 $'[11:-2]
import sys,os,time,string,Globals, Acquisition import sys,os,time,string,Globals, Acquisition
...@@ -69,11 +69,22 @@ class ApplicationManager(Folder,CacheManager): ...@@ -69,11 +69,22 @@ class ApplicationManager(Folder,CacheManager):
def __init__(self): def __init__(self):
self.Products=ProductFolder() self.Products=ProductFolder()
def __setstate__(self, v):
ApplicationManager.inheritedAttribute('__setstate__')(self, v) # Note by brian:
if not hasattr(self, 'Products'): #
self.Products=ProductFolder() # This __setstate__ does not seem to work - it creates a new ProductFolder
# and adds it to the CP instance if needed, but the resulting PF does not
# seem to be persistent ;( Rather than spend much time figuring out why,
# I just added a check in Application.open_bobobase to create the PF if
# it is needed (this is where several other b/c checks are done anyway.)
#
#
# def __setstate__(self, v):
# ApplicationManager.inheritedAttribute('__setstate__')(self, v)
# if not hasattr(self, 'Products'):
# self.Products=ProductFolder()
def _canCopy(self, op=0): def _canCopy(self, op=0):
return 0 return 0
......
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