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
del self._index[entry]
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,7 +210,14 @@ class UnIndex(SimpleItem):
# an IntSet and stuff it in first.
if indexRow is _marker:
self._index[entry] = documentId
self._length.change(1)
# 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)
except AttributeError:
......
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