Skip to content

Commit

Permalink
Merge pull request #198 from plone/maurits-fix-remove_legacy_resource…
Browse files Browse the repository at this point in the history
…_registries

Fixed permission error while removing old resource registries.
  • Loading branch information
jensens authored Feb 19, 2019
2 parents 0fdfd12 + 94e8413 commit 2659b44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions news/197.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed permission error while removing old resource registries.
[maurits]
7 changes: 4 additions & 3 deletions plone/app/upgrade/v52/betas.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def remove_legacy_resource_registries(context):
]

# remove obsolete tools
tools = [t for t in tools_to_remove if t in portal]
if tools:
portal.manage_delObjects(tools)
for tool in tools_to_remove:
if tool not in portal:
continue
portal._delObject(tool)

cleanUpToolRegistry(context)

Expand Down

0 comments on commit 2659b44

Please sign in to comment.