Commit a677cd04 authored by Jérome Perrin's avatar Jérome Perrin

Base_getPreferredSectionItemList: fix a bug

When existing categoy is not part of the preferred sections the existing category was added to the cache value. Copy the list before.
parent 478b0e83
......@@ -83,6 +83,7 @@ getPreferredSectionItemList = CachingMethod(getPreferredSectionItemList,\n
section_item_list = getPreferredSectionItemList(portal_type, validation_state)\n
\n
if base_category:\n
section_item_list = section_item_list[::] # make a copy not to modify the cache value\n
current_category = context.getProperty(base_category)\n
if current_category and current_category not in zip(*section_item_list)[1]:\n
section_item_list.append(\n
......
41167
\ No newline at end of file
41168
\ 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