Commit 2df5e9e5 authored by Nicolas Dumazet's avatar Nicolas Dumazet

dont use 'id' as a local variable: it's already a function parameter


The typical example of why using short variable names is evil =)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32813 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 79065efa
......@@ -471,19 +471,19 @@ class XMLMatrix(Folder):
return self.newCellContent(cell_id,**kwd)
security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' )
def newCellContent(self, id, portal_type=None, **kw):
def newCellContent(self, cell_id, portal_type=None, **kw):
"""
Creates a new content as a cell. This method is
meant to be overriden by subclasses.
"""
if portal_type is None:
for x in self.allowedContentTypes():
id = x.getId()
portal_type_id = x.getId()
if id.endswith(' Cell'):
portal_type = id
portal_type = portal_type_id
break
return self.newContent(id=id, portal_type=portal_type, **kw)
return self.newContent(id=cell_id, portal_type=portal_type, **kw)
security.declareProtected( Permissions.AccessContentsInformation,
'getCellKeyList' )
......
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