Created
May 13, 2014 14:12
-
-
Save do3cc/1179ebaa8de24247eb75 to your computer and use it in GitHub Desktop.
Repair CMFEditions quick and dirty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Products.CMFEditions.ZVCStorageTool import Removed | |
zvc_repo = app.Plone2.portal_historiesstorage.zvc_repo | |
for shadow_history in app.Plone2.portal_historiesstorage._shadowStorage._storage.values(): | |
for version in shadow_history._full.values(): | |
if not 'referenced_data' in version: | |
continue | |
vc_info = version['vc_info'] | |
zope_version = zvc_repo._histories[vc_info.history_id]._versions[vc_info.version_id] | |
if isinstance(Removed, zope_version._data._object): | |
del version['referenced_data'] | |
shadow_history._full._p_changed = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment