Commit ef2c8343 authored by Andreas Jung's avatar Andreas Jung

extra.indexed_attrs is now optional. leaving this input field

empty lead to an empty index.
parent 9d5ebbfc
......@@ -13,7 +13,7 @@
"""Simple column indices"""
__version__='$Revision: 1.17 $'[11:-2]
__version__='$Revision: 1.18 $'[11:-2]
from Globals import Persistent
from Acquisition import Implicit
......@@ -88,7 +88,8 @@ class UnIndex(Persistent, Implicit, SimpleItem):
try:
self.indexed_attrs = extra.indexed_attrs.split(',')
self.indexed_attrs = [ attr.strip() for attr in self.indexed_attrs if attr ]
except: self.indexed_attrs = [ self.id ]
except: pass
if len(self.indexed_attrs) == 0: self.indexed_attrs = [ self.id ]
self.__len__=BTrees.Length.Length() # see __len__ method docstring
self.clear()
......
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