From b5406f929ad43160dd8acf3cfa04f20e369ac9b7 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Wed, 5 Jan 2011 08:14:09 +0000
Subject: [PATCH] if the property sheet exists in both the filesystem and ZODB,
 zodb should take over

(CMFActivity PropertySheet's might stay on the filesystem?)


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

diff --git a/product/ERP5Type/dynamic/portal_type_class.py b/product/ERP5Type/dynamic/portal_type_class.py
index b152fca66a..49d43133b5 100644
--- a/product/ERP5Type/dynamic/portal_type_class.py
+++ b/product/ERP5Type/dynamic/portal_type_class.py
@@ -265,10 +265,10 @@ def generatePortalTypeClass(portal_type_name):
         #
         # NOTE: The Property Sheets of a document should be given as a
         #       string from now on
-        if isinstance(property_sheet, basestring) and \
-          property_sheet in zodb_property_sheet_set:
-          property_sheet_name = property_sheet
-          property_sheet_set.add(property_sheet_name)
+        if not isinstance(property_sheet, basestring):
+          property_sheet = property_sheet.__name__
+        if property_sheet in zodb_property_sheet_set:
+          property_sheet_set.add(property_sheet)
 
     import erp5
 
-- 
2.30.9