Hi!

I'm about to migrate a couple of documents from "documentish" to folderish (FolderishProxyDocument)

CPS uses isinstance(ProxyFolderishDocument) in some places, so changing to portal type to folderish is not enough.

instances must be changed too.

the current script does:

    for brain in brains:
       ob = brain.getObject()
       if ob is None:
           continue

       if isinstance(ob, ProxyFolderishDocument):
           continue

       ob.__class__ = ProxyFolderishDocument
       ob._p_changed = 1 # trigger persistence
       ob.proxyChanged()

       # + some workflow history stuff omitted here

anything more to think about ?

/JM
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to