Commit 951ca867 authored by Nicolas Dumazet's avatar Nicolas Dumazet

use setdefault


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32747 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent adadb375
...@@ -152,8 +152,7 @@ class SupplyLine(Path, XMLMatrix): ...@@ -152,8 +152,7 @@ class SupplyLine(Path, XMLMatrix):
""" """
This method can be overriden This method can be overriden
""" """
if 'base_id' not in kwd: kwd.setdefault('base_id', 'path')
kwd['base_id'] = 'path'
return XMLMatrix.getCell(self, *kw, **kwd) return XMLMatrix.getCell(self, *kw, **kwd)
security.declareProtected(Permissions.ModifyPortalContent, 'newCell') security.declareProtected(Permissions.ModifyPortalContent, 'newCell')
...@@ -161,8 +160,7 @@ class SupplyLine(Path, XMLMatrix): ...@@ -161,8 +160,7 @@ class SupplyLine(Path, XMLMatrix):
""" """
This method creates a new cell This method creates a new cell
""" """
if 'base_id' not in kwd: kwd.setdefault('base_id', 'path')
kwd['base_id'] = 'path'
return XMLMatrix.newCell(self, *kw, **kwd) return XMLMatrix.newCell(self, *kw, **kwd)
############################################################ ############################################################
......
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