Commit 0b7c57cd authored by Sebastien Robin's avatar Sebastien Robin

Folder.py: more explicit error message when disallowed subobject type is raised

parent 5c349095
......@@ -148,7 +148,7 @@ class FolderMixIn(ExtensionClass.Base):
type_info = pt.getTypeInfo(container)
if type_info is not None and not type_info.allowType(portal_type) and \
'portal_trash' not in container.getPhysicalPath():
raise ValueError('Disallowed subobject type: %s' % portal_type)
raise ValueError('Disallowed subobject type: %s on %r' % (portal_type, container))
type_info = pt.getTypeInfo(portal_type)
if type_info is None:
......
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