[Zope-dev] ZCatalog regression: indexing None values
y.2015 at wcm-solutions.de
Thu Feb 5 12:36:48 CET 2015
Indexes shipped with ZCatalog 3 no longer work with None values:
I'm not sure if the old behavior did follow a well defined policy, I
just found this explanation:
I think in general the policy was to ignore None values if the index
can't handle them. And AFAICS that's a much better policy than raising
errors as ZCatalog 3 does.
There is nothing wrong about None values returned by content attributes.
Often they have a special meaning like not initialized, not selected,
not specified. In most cases it wouldn't cause trouble if None is not
indexed, but it causes trouble if indexing raises errors.
Adjusting code that implements special behavior for None, adjusting
persistent attributes that contain None or adding wrappers that modify
indexed attributes is a lot of work.
I propose to ignore None values instead of raising errors.
More information about the Zope-Dev