Skip to content

Commit

Permalink
Do not break when indexing multiple indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Dec 5, 2019
1 parent 456582e commit 4650aec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Products/ZCatalog/ZCatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,15 @@ def manage_clearIndex(self, ids=None,
@security.protected(manage_zcatalog_entries)
def reindexIndex(self, name, REQUEST, pghandler=None):
if isinstance(name, str):
name = (name, )
idxs = (name, )
else:
idxs = 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 +435,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 4650aec

Please sign in to comment.