Commit 1ab06076 authored by Nicolas Dumazet's avatar Nicolas Dumazet

avoid some lookups


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32740 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f951aaba
...@@ -146,9 +146,10 @@ class XMLMatrix(Folder): ...@@ -146,9 +146,10 @@ class XMLMatrix(Folder):
base_id = kwd.get('base_id', "cell") base_id = kwd.get('base_id', "cell")
if not self.index.has_key(base_id): if not self.index.has_key(base_id):
return 0 return 0
base_item = self.index[base_id]
for i, my_id in enumerate(kw): for i, my_id in enumerate(kw):
if self.index[base_id].has_key(i): if base_item.has_key(i):
if not self.index[base_id][i].has_key(my_id): if not base_item[i].has_key(my_id):
return 0 return 0
else: else:
return 0 return 0
......
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