plone.app.upgrade/master: Merge pull request #128 from plone/fix-84
GitHub <jenkins-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Repository: plone.app.upgrade Branch: refs/heads/master Date: 2017-07-19T18:44:25+02:00 Author: agitator (agitator) <[email protected]> Commit: https://github.com/plone/plone.app.upgrade/commit/bdd0f9532ae0dca6fd47d56f9bb3d5ef0a05365c Merge pull request #128 from plone/fix-84 fixes #84 - bug while migration, aq_base function works Files changed: M CHANGES.rst M plone/app/upgrade/v50/final.py diff --git a/CHANGES.rst b/CHANGES.rst index 9785daa..266a629 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -15,7 +15,8 @@ New features: Bug fixes: -- *add item here* +- Fix #84 - usage of aq_base + [jensens] 2.0.5 (2017-07-03) diff --git a/plone/app/upgrade/v50/final.py b/plone/app/upgrade/v50/final.py index 57a6478..0f4b44a 100644 --- a/plone/app/upgrade/v50/final.py +++ b/plone/app/upgrade/v50/final.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from Acquisition import aq_base from plone.app.upgrade.utils import loadMigrationProfile from plone.registry.interfaces import IRegistry from Products.CMFCore.utils import getToolByName @@ -70,7 +71,7 @@ def refresh_getIcon_catalog_metadata(context): for brain in zcatalog.unrestrictedSearchResults(): # First get the new value obj = brain._unrestrictedGetObject() - new_value = bool(getattr(obj.aq_base, 'image', False)) + new_value = bool(getattr(aq_base(obj), 'image', False)) # We can now update the record with the new getIcon value record = list(catalog.data[brain.getRID()]) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot