Commit 3290f5cc authored by Christophe Dumez's avatar Christophe Dumez

- fixed SQL search in OOo import

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9139 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 942537ac
......@@ -88,13 +88,12 @@ result_dict = {}\n
for category_name in category_dict.keys():\n
subcat_code = category_dict[category_name]\n
category_object = context.getPortalObject().portal_categories[category_name]\n
result_list = context.portal_catalog(portal_type=\'Category\', reference=str(subcat_code), relative_url=category_name+\'%\')\n
result_list = context.portal_catalog(portal_type=\'Category\', reference=\'=\'+str(subcat_code), relative_url=category_name+\'%\')\n
if len(result_list) != 0:\n
result_cat_fullpath = \'/\'.join(result_list[0].getRelativeUrl().split(\'/\')[1:])\n
result_dict[category_name]=result_cat_fullpath\n
else:\n
# XXX: this request does a LIKE "%xxxx%", We should find a way to remove the %%\n
result_list = context.portal_catalog(portal_type=\'Category\', title=str(subcat_code), relative_url=category_name+\'%\')\n
result_list = context.portal_catalog(portal_type=\'Category\', title=\'=\'+str(subcat_code), relative_url=category_name+\'%\')\n
if len(result_list) != 0:\n
result_cat_fullpath = \'/\'.join(result_list[0].getRelativeUrl().split(\'/\')[1:])\n
result_dict[category_name]=result_cat_fullpath\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