Skip to content

Commit

Permalink
Merge pull request #66 from plone/thet-zope4
Browse files Browse the repository at this point in the history
Zope4
  • Loading branch information
thet committed Jan 29, 2016
2 parents d9b1239 + 4594d9f commit 558e507
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ New:

Fixes:

- *add item here*
- Fix ``cleanUpProductRegistry`` to not break when ``Control_Panel`` cannot be found.
Fixes test failures with Zope 4.
[thet]


1.3.20 (2016-01-08)
Expand Down
14 changes: 8 additions & 6 deletions plone/app/upgrade/v40/alphas.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,14 @@ def cleanUpSkinsTool(context):


def cleanUpProductRegistry(context):
control = getattr(context, 'Control_Panel')
products = control.Products

# Remove all product entries
for name in products.keys():
products._delObject(name)
control = getattr(context, 'Control_Panel', None)
if control:
products = control.Products

# Remove all product entries
for name in products.keys():
products._delObject(name)
# else: pass # Zope 4 doesn't have the Control_Panel anymore


def migrateStaticTextPortlets(context):
Expand Down

0 comments on commit 558e507

Please sign in to comment.