Skip to content

Commit

Permalink
Fixed deleting orphans in Plone 5.1+ (CMFEditions 3).
Browse files Browse the repository at this point in the history
Fixes issue #19.
  • Loading branch information
mauritsvanrees committed Oct 3, 2019
1 parent bbfaa7f commit 6cd0884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
0.8 (unreleased)
----------------

- Fixed deleting orphans in Plone 5.1+ (CMFEditions 3).
Fixes `issue #19 <https://github.com/collective/collective.revisionmanager/issues/19>`_. [maurits]

- Fixed startup error by loading the CMFCore zcml. [maurits]

- Do not fail on ``BrokenModified`` while calculating storage statistics.
Expand Down
7 changes: 4 additions & 3 deletions src/collective/revisionmanager/browser/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ def __call__(self):
if len(history['wcinfos']) > 1:
continue
wcinfo = history['wcinfos'][0]
if (wcinfo['url'] is None) and \
wcinfo['path'].startswith('no working copy'):
keys.append(history['history_id'])
if wcinfo['url'] is None:
path = wcinfo['path']
if path.startswith('no working copy') or path == 'All revisions have been purged':
keys.append(history['history_id'])
self._del_histories(keys)
histories = stats.get('histories', [])
sortkey = self._determine_sortkey()
Expand Down

0 comments on commit 6cd0884

Please sign in to comment.