Commit 573564ad authored by Nicolas Dumazet's avatar Nicolas Dumazet

passing id='' or id=None is nonsense


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40942 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e4a5ef99
......@@ -336,6 +336,9 @@ class ERP5TypeInformation(XMLObject,
Call the init_script for the portal_type.
Returns the object.
"""
if id is None or len(id) == 0:
raise ValueError("invalid object id")
if not temp_object and not self.isConstructionAllowed(container):
raise AccessControl_Unauthorized('Cannot create %s' % self.getId())
......
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