Skip to content

Commit

Permalink
fixes #84 - bug while migration, aq_base function works
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Jul 19, 2017
1 parent 226558a commit 9f99dae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ New features:

Bug fixes:

- *add item here*
- Fix #84 - usage of aq_base
[jensens]


2.0.5 (2017-07-03)
Expand Down
3 changes: 2 additions & 1 deletion plone/app/upgrade/v50/final.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()])
Expand Down

0 comments on commit 9f99dae

Please sign in to comment.