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

test if container type allow the created type, not self.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12864 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 06a69582
......@@ -100,7 +100,7 @@ class FolderMixIn(ExtensionClass.Base):
m = getattr(Document, factory_name)
return m(container, new_id)
myType = pt.getTypeInfo(self)
myType = pt.getTypeInfo(container)
if myType is not None:
if not myType.allowType( portal_type ):
raise ValueError('Disallowed subobject type: %s' % portal_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