Hello,

in a product I try to make a file object persistent with the _setObject() 
method.

However I get the error:
Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

The following is the code where the error occurs:

cpu_load = self.getCpuLoad(id,location_sar,f_time,l_time)
system.cpu_load_file=File(data=cpu_load[0], contentType='text/plain')
self.tgt_folder[id]._setObject('cpu_load',system.cpu_load_file)

This is done in the __init__ method of the class. The class subclasses from 
Folder and SimpleItem.
self.tgt_folder[id] has been created a few lines above by:

self.tgt_folder[id]=Folder()
self._setObject(id,self.tgt_folder[id])

The container that holds self.tgt_folder[id] is a BTreesFolder2.

I know that the file Object is pretty simple, but how can one create and 
persist it if not with the _setObject() method?

Thanks in advance

Roman
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to