Commit 62252cda authored by Nicolas Dumazet's avatar Nicolas Dumazet

fix lookup of parent_type in aq_portal_type

Bas.aq_portal_type uses aq_key keys: as a result, has_key(parent_portal_type)
would always return False. If we want such a test, we need to test for _aq_key


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39866 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 55d89945
...@@ -554,11 +554,12 @@ def initializePortalTypeDynamicProperties(self, klass, ptype, aq_key, portal): ...@@ -554,11 +554,12 @@ def initializePortalTypeDynamicProperties(self, klass, ptype, aq_key, portal):
parent_klass = parent_object.__class__ parent_klass = parent_object.__class__
parent_type = parent_object.portal_type parent_type = parent_object.portal_type
if getattr(parent_klass, 'isRADContent', 0) and \ if getattr(parent_klass, 'isRADContent', 0) and \
(ptype != parent_type or klass != parent_klass) and \ (ptype != parent_type or klass != parent_klass):
not Base.aq_portal_type.has_key(parent_type): parent_aq_key = parent_object._aq_key()
initializePortalTypeDynamicProperties(parent_object, parent_klass, if parent_aq_key not in Base.aq_portal_type:
parent_type, initializePortalTypeDynamicProperties(parent_object, parent_klass,
parent_object._aq_key(), portal) parent_type,
parent_aq_key, portal)
prop_list = list(getattr(klass, '_properties', [])) prop_list = list(getattr(klass, '_properties', []))
cat_list = list(getattr(klass, '_categories', [])) cat_list = list(getattr(klass, '_categories', []))
......
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