Skip to content

Commit

Permalink
Merge branch 'master' into issue_84
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Dec 6, 2019
2 parents 5c4899b + 6526fa6 commit e5e1992
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
11 changes: 8 additions & 3 deletions CHANGES.rst
Expand Up @@ -7,11 +7,16 @@ Changelog
- Nothing changed yet.


5.0.1 (2019-06-17)
5.0.2 (2019-12-06)
------------------

Bug fixes
+++++++++
- Fix exception happening when reindexing multiple indexes while having a
progress handler.
(`#89 <https://github.com/zopefoundation/Products.ZCatalog/pull/89>`_)


5.0.1 (2019-06-17)
------------------

- Fix sorting of index overview table in ZMI. Migrated the template from
to zpt.
Expand Down
10 changes: 5 additions & 5 deletions src/Products/ZCatalog/ZCatalog.py
Expand Up @@ -410,14 +410,14 @@ def manage_clearIndex(self, ids=None,

@security.protected(manage_zcatalog_entries)
def reindexIndex(self, name, REQUEST, pghandler=None):
if isinstance(name, str):
name = (name, )

# This method does the actual reindexing of indexes.
# `name` can be the name of an index of a list of names.
idxs = (name, ) if isinstance(name, str) else name
paths = self._catalog.uids.keys()

i = 0
if pghandler:
pghandler.init('reindexing %s' % name, len(paths))
pghandler.init('reindexing {}'.format(idxs), len(paths))

for p in paths:
i += 1
Expand All @@ -433,7 +433,7 @@ def reindexIndex(self, name, REQUEST, pghandler=None):
else:
# don't update metadata when only reindexing a single
# index via the UI
self.catalog_object(obj, p, idxs=name,
self.catalog_object(obj, p, idxs=idxs,
update_metadata=0, pghandler=pghandler)

if pghandler:
Expand Down

0 comments on commit e5e1992

Please sign in to comment.