Commit a6378180 authored by Yusei Tahara's avatar Yusei Tahara

Fix missing import.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26904 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b21edd8
......@@ -8,6 +8,7 @@ from Errors import ValidationError
from Products.Formulator.Widget import MultiItemsWidget
from zLOG import LOG
class Field:
"""Base class of all fields.
A field is an object consisting of a widget and a validator.
......@@ -365,6 +366,8 @@ class Field:
self.generate_subfield_key(id, validation=1, key=key), REQUEST)
def PrincipiaSearchSource(self):
from Products.Formulator import MethodField
from Products.Formulator import TALESField
def getSearchSource(obj):
obj_type = type(obj)
if obj_type is MethodField.Method:
......@@ -372,7 +375,9 @@ class Field:
elif obj_type is TALESField.TALESMethod:
return obj._text
return str(obj)
return ''.join(map(getSearchSource, (self.values.values()+self.tales.values()+self.overrides.values())))
return ''.join(map(getSearchSource,
(self.values.values()+self.tales.values()+
self.overrides.values())))
Globals.InitializeClass(Field)
......
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