Commit 86cc67d4 authored by 's avatar

Fixed manage_addZClass to find base classes correctly when a ZClass is

created in the methods propertysheet of another ZClass object.
parent 32f563b7
......@@ -103,15 +103,21 @@ manage_addZClassForm=Globals.HTMLFile(
CreateFactory=1)
def manage_addZClass(self, id, title='', baseclasses=[],
meta_type='', CreateFactory=1, REQUEST=None):
meta_type='', CreateFactory=0, REQUEST=None):
"""Add a Z Class
"""
bases=[]
for b in baseclasses:
if Products.meta_classes.has_key(b):
bases.append(Products.meta_classes[b])
else:
elif hasattr(self, b):
bases.append(getattr(self, b))
else:
# If self is the "methods" propertysheet
# of a ZClass, get the class from the
# propertysheet.
bases.append(self._getOb(b))
Z=ZClass(id,title,bases)
if meta_type: Z._zclass_.meta_type=meta_type
......
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