On Thursday 02 May 2002 10:48 am, Lennart Regebro allegedly wrote:
> In Zope 2.3.3 we did this with ZCatalog, on a field index:
> query['effective_date'] = ['', DateTime.now()]
> query['effective_date_usage'] = 'range:max'
> This returns all records where the effective_date is lower than todays date
> OR the effective_date is an empty string.
> In Zope 2.5.1, the same code now returns *all* records. It seems like now
> suddenly comparing dates and an empty string always returns true.
That is a funky way to pass the value when using range:max. I would just pass
it bare as in:
query['effective_date'] = DateTime()
You only need to pass a sequence as your search term if: You want to match on
multiple values, you are using "range:min:max", or if you are looking for the
empty string (which makes me a tad ill whenever I see it, but...). Otherwise,
you can just pass the single value.
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -