Commit 50eb451a authored by Ivan Tyagov's avatar Ivan Tyagov

Temp objects do not have portal_type definition so in case getSearchableText...

Temp objects do not have portal_type definition so in case getSearchableText is called on them use 'Base Type' one.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37178 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 59684e8c
......@@ -3201,6 +3201,10 @@ class Base( CopyContainer,
"""
searchable_text_list = []
portal_type = self.portal_types.getTypeInfo(self)
if portal_type is None and self.isTempDocument():
# if it's a temp object we have no portal_type definition
# so use definition of 'Base Type' for searchable methods & properties
portal_type = self.portal_types.getTypeInfo('Base Type')
searchable_text_method_id_list = []
# generated from properties methods and add explicitly defined method_ids as well
for searchable_text_property_id in portal_type.getSearchableTextPropertyIdList():
......
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