Commit d8878e6c authored by Jean-Paul Smets's avatar Jean-Paul Smets

Fixed bug for method properties in getSearchableText.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13681 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3229d229
...@@ -455,6 +455,13 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin): ...@@ -455,6 +455,13 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
""" """
we try to get a list, else we get value and convert to list we try to get a list, else we get value and convert to list
""" """
method = getattr(self, property, None)
if method is not None:
if callable(method):
val = method()
if isinstance(val, list) or isinstance(val, tuple):
return list(val)
return [str(val)]
val = self.getPropertyList(property) val = self.getPropertyList(property)
if val is None: if val is None:
val = self.getProperty(property) val = self.getProperty(property)
......
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