Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
48249b5d
Commit
48249b5d
authored
Jan 31, 2005
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for _length
parent
054cc497
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
...n/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
+2
-1
lib/python/Products/PluginIndexes/common/UnIndex.py
lib/python/Products/PluginIndexes/common/UnIndex.py
+2
-1
No files found.
lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
View file @
48249b5d
...
...
@@ -25,6 +25,7 @@ from OFS.SimpleItem import SimpleItem
from
BTrees.IOBTree
import
IOBTree
from
BTrees.IIBTree
import
IISet
,
IITreeSet
,
union
,
intersection
,
multiunion
import
BTrees.Length
from
Globals
import
package_home
,
DTMLFile
,
InitializeClass
from
AccessControl
import
ClassSecurityInfo
...
...
@@ -136,7 +137,7 @@ class DateRangeIndex(UnIndex):
self
.
_since
=
IOBTree
()
self
.
_until
=
IOBTree
()
self
.
_unindex
=
IOBTree
()
# 'datum' will be a tuple of date ints
self
.
_length
.
set
(
0
)
self
.
_length
=
BTrees
.
Length
.
Length
(
)
#
# PluggableIndexInterface implementation (XXX inherit assertions?)
...
...
lib/python/Products/PluginIndexes/common/UnIndex.py
View file @
48249b5d
...
...
@@ -99,6 +99,7 @@ class UnIndex(SimpleItem):
def
clear
(
self
):
self
.
_index
=
OOBTree
()
self
.
_unindex
=
IOBTree
()
self
.
_length
.
set
(
0
)
def
__nonzero__
(
self
):
return
not
not
self
.
_unindex
...
...
@@ -203,7 +204,7 @@ class UnIndex(SimpleItem):
returnStatus
=
0
# First we need to see if there's anything interesting to look at
datum
=
self
.
_get_object_datum
(
obj
,
attr
)
datum
=
self
.
_get_object_datum
(
obj
,
attr
)
# We don't want to do anything that we don't have to here, so we'll
# check to see if the new and existing information is the same.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment