Commit cb742afe authored by Yusei Tahara's avatar Yusei Tahara

if list is empty, then convert it to empty string.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18416 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c2e83003
...@@ -83,8 +83,11 @@ if document.hasBaseData():\n ...@@ -83,8 +83,11 @@ if document.hasBaseData():\n
value = kw.get(field, None)\n value = kw.get(field, None)\n
if value is None:\n if value is None:\n
value_list = kw.get(\'%s_list\' % field, None)\n value_list = kw.get(\'%s_list\' % field, None)\n
if value_list is not None and len(value_list)>0:\n if value_list is not None:\n
value = \' \'.join(map(str, value_list))\n if len(value_list)>0:\n
value = \' \'.join(map(str, value_list))\n
else:\n
value = \'\'\n
if value is not None:\n if value is not None:\n
new_metadata[field] = value \n new_metadata[field] = value \n
if new_metadata:\n if new_metadata:\n
......
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