[Erp5-report] r32813 nicolas.dumazet - /erp5/trunk/products/ERP5Type/XMLMatrix.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 19 03:21:46 CET 2010
Author: nicolas.dumazet
Date: Fri Feb 19 03:21:44 2010
New Revision: 32813
URL: http://svn.erp5.org?rev=32813&view=rev
Log:
dont use 'id' as a local variable: it's already a function parameter
The typical example of why using short variable names is evil =)
Modified:
erp5/trunk/products/ERP5Type/XMLMatrix.py
Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=32813&r1=32812&r2=32813&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Fri Feb 19 03:21:44 2010
@@ -471,19 +471,19 @@
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' )
More information about the Erp5-report
mailing list