From 9839db19d0db9c0ad01d61ede65c9c45919db6ba Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Thu, 10 Sep 2009 16:05:17 +0000
Subject: [PATCH] fix the wrong condition and code. this bug was found thanks
 to a horrible name; portal_skins/erp5_dms/RSS (Script Python) whose id exists
 in one of skin selection name...

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28905 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/CMFCoreSkinsTool.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/patches/CMFCoreSkinsTool.py b/product/ERP5Type/patches/CMFCoreSkinsTool.py
index 0fde1945a7..bbd9c6aee6 100644
--- a/product/ERP5Type/patches/CMFCoreSkinsTool.py
+++ b/product/ERP5Type/patches/CMFCoreSkinsTool.py
@@ -60,8 +60,8 @@ def CMFCoreSkinsTool__updateCacheEntry(self, container_id, object_id):
       if container_id in skin_folder_id_list:
         skin_folder_id_list.reverse()
         this_folder_index = skin_folder_id_list.index(container_id)
-        if skin_location_list.has_key(object_id):
-          existing_folder_index = skin_folder_id_list.index(skin_location_list[object_id])
+        if skin_location_list[selection_name].has_key(object_id):
+          existing_folder_index = skin_folder_id_list.index(skin_location_list[selection_name][object_id])
         else:
           existing_folder_index = this_folder_index + 1
         if existing_folder_index > this_folder_index:
-- 
2.30.9