Commit 7a57f1df authored by Andreas Jung's avatar Andreas Jung

      - Collector #1899: fixed migration issue when using export/import for
        ZCatalog instances
parent b2f567b3
......@@ -42,6 +42,9 @@ Zope Changes
Bugs Fixed
- Collector #1899: fixed migration issue when using export/import for
ZCatalog instances
- Collector #1871: Applied patch to support lists with records using
ZTUtils.make_query()
......
......@@ -175,7 +175,15 @@ class UnIndex(SimpleItem):
except AttributeError:
# index row is an int
try:
del self._index[entry]
except KeyError:
# XXX swallow KeyError because it was probably
# removed and then _length AttributeError raised
pass
if isinstance(self.__len__, BTrees.Length.Length):
self._length = self.__len__
del self.__len__
self._length.change(-1)
except:
......@@ -202,6 +210,13 @@ class UnIndex(SimpleItem):
# an IntSet and stuff it in first.
if indexRow is _marker:
self._index[entry] = documentId
# XXX _length needs to be migrated to Length object
try:
self._length.change(1)
except AttributeError:
if isinstance(self.__len__, BTrees.Length.Length):
self._length = self.__len__
del self.__len__
self._length.change(1)
else:
try: indexRow.insert(documentId)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment