Prevent key error in BrowseRecord with big cache

This commit is contained in:
Cédric Krier committed 2009-11-06 16:58:31 +01:00
1 parent 9ac17bae3e
commit 5b3e41f0ab
1 file changed
+1 -1
+1 -1
View File
@@ -135,7 +135,7 @@ class BrowseRecord(object):
else:
iterids = self._local_data.iterkeys()
ids = [x for x in iterids \
if not self._data[x].has_key(name) \
if not self._data.setdefault(x, {}).has_key(name) \
and not self._local_data.setdefault(x, {}).has_key(name)]
# read the data
datas = self._model.read(self._cursor, self._user, ids,