Commit 1ffc9c3b authored by Ivan Tyagov's avatar Ivan Tyagov

Do not try to show in search mode bolded found text fragmenrts in case...

Do not try to show in search mode bolded found text fragmenrts in case document has no base data (i.e. not converted).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21711 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66933715
...@@ -75,8 +75,14 @@ ...@@ -75,8 +75,14 @@
"""\n """\n
# convert object to text (if possible)\n # convert object to text (if possible)\n
document_text = \'\'\n document_text = \'\'\n
if getattr(context, \'asText\', None) is not None:\n if getattr(context, \'asText\', None) is not None and \\\n
document_text = context.asText()\n getattr(context, \'hasBaseData\', None) is not None:\n
if context.hasBaseData():\n
# document is successfully converted\n
document_text = context.asText()\n
else:\n
# document not converted (due to a conversion error), return message to user\n
return context.Base_translateString(\'Document is not converted.\')\n
\n \n
# get search words from listbox selection\n # get search words from listbox selection\n
argument_names = (\'advanced_search_text\', \n argument_names = (\'advanced_search_text\', \n
......
895 896
\ No newline at end of file \ No newline at end of file
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