Commit c689463f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

modify getSearchableText():

* support list properties.
* cast to str explicitly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38011 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6d023f02
...@@ -3221,8 +3221,11 @@ class Base( CopyContainer, ...@@ -3221,8 +3221,11 @@ class Base( CopyContainer,
if method is not None: if method is not None:
method_value = method() method_value = method()
if method_value is not None: if method_value is not None:
if isinstance(method_value, (list, tuple)):
searchable_text_list.extend(method_value)
else:
searchable_text_list.append(method_value) searchable_text_list.append(method_value)
searchable_text = ' '.join(searchable_text_list) searchable_text = ' '.join([str(x) for x in searchable_text_list])
return searchable_text return searchable_text
# Compatibility with CMF Catalog / CPS sites # Compatibility with CMF Catalog / CPS sites
......
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