Commit 075df455 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

We need to make a 'shallow copy' here other wise the cached value is also modified.

(bad)
  tmp_list = caching_method()
  tmp_list.extend(...)
(good)
  tmp_list = caching_method()[:]
  tmp_list.extend(...)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26641 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 177d0c6f
......@@ -66,7 +66,7 @@ category_list = []\n
ctool = context.portal_categories\n
for item in mixed_list:\n
base_category = ctool[item]\n
item_list = base_category.getCategoryChildCompactLogicalPathItemList(base=1)\n
item_list = base_category.getCategoryChildCompactLogicalPathItemList(base=1)[:]\n
if item_list == [[\'\', \'\']]:\n
for fallback_category in base_category.getFallbackBaseCategoryList():\n
fallback_category = ctool.restrictedTraverse(fallback_category, None)\n
......
1168
\ No newline at end of file
1169
\ 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