Commit cee3946e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

prevent errors if version etc. is missing.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27205 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 343f128f
...@@ -68,12 +68,9 @@ else:\n ...@@ -68,12 +68,9 @@ else:\n
\n \n
# prepare query params\n # prepare query params\n
kw = {\'portal_type\' : portal_type}\n kw = {\'portal_type\' : portal_type}\n
if form_data.get(\'clone_reference\'): \n kw[\'reference\'] = form_data.get(\'clone_reference\') or \'\'\n
kw[\'reference\'] = form_data[\'clone_reference\']\n kw[\'version\'] = form_data.get(\'clone_version\') or \'\'\n
if form_data.get(\'clone_version\'): \n kw[\'language\'] = form_data.get(\'clone_language\') or \'\'\n
kw[\'version\'] = form_data[\'clone_version\']\n
if form_data.get(\'clone_language\'): \n
kw[\'language\'] = form_data[\'clone_language\']\n
\n \n
# Count documents of same reference and prepare kw\n # Count documents of same reference and prepare kw\n
count = int(context.portal_catalog.countResults(**kw)[0][0])\n count = int(context.portal_catalog.countResults(**kw)[0][0])\n
......
815 816
\ 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