[Zope] Catalog wierdness?
Mark Gibson
mark@dimensional.com
Sun, 16 Mar 2003 15:01:27 -0700 (MST)
Using:
Zope Version
(Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)
Python Version
2.1.3 (#1, Apr 22 2002, 16:16:34) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)]
In the catalog, I have a FieldIndex that contains an integer.
I want to select all objects where that number is 0 or less.
objs=Catalog(number_times_sent=0 ,number_times_sent_usage='range:max' )
However, this returns all items, regardless of the value of number_times_sent.
If an object has number_times_sent to 2, and I do this call:
objs= Catalog(number_times_sent=1 ,number_times_sent_usage='range:max' )
It works as expected, and that object isn't returned. Also, when
number_times_sent is 0, the following does work.
objs= Catalog(number_times_sent=0)
Since I won't have a negative value, this does what I want. However,
number_times_sent is variable, so it would be nice if 'range:max' worked for
zero.
Is there any logical explanation? Bug? Am I doing something wrong?
Thanks,
Mark