Commit d4452316 authored by Martijn Pieters's avatar Martijn Pieters

Merge r 40426 from the trunk: make DateIndexes upgradeble from Zope 2.7 by way

of a re-index.
parent 6ce13d90
...@@ -20,6 +20,7 @@ from datetime import date, datetime ...@@ -20,6 +20,7 @@ from datetime import date, datetime
from datetime import tzinfo, timedelta from datetime import tzinfo, timedelta
from types import StringType, FloatType, IntType from types import StringType, FloatType, IntType
import BTrees.Length
from BTrees.IIBTree import IISet, union, intersection, multiunion from BTrees.IIBTree import IISet, union, intersection, multiunion
from BTrees.IOBTree import IOBTree from BTrees.IOBTree import IOBTree
from BTrees.OIBTree import OIBTree from BTrees.OIBTree import OIBTree
...@@ -111,7 +112,7 @@ class DateIndex(UnIndex, PropertyManager): ...@@ -111,7 +112,7 @@ class DateIndex(UnIndex, PropertyManager):
""" Complete reset """ """ Complete reset """
self._index = IOBTree() self._index = IOBTree()
self._unindex = OIBTree() self._unindex = OIBTree()
self._length.set(0) self._length = BTrees.Length.Length()
def index_object( self, documentId, obj, threshold=None ): def index_object( self, documentId, obj, threshold=None ):
"""index an object, normalizing the indexed value to an integer """index an object, normalizing the indexed value to an integer
......
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