Commit e1769b3f authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Vincent Pelletier

ZSQLCatalog: Prefere using in instead of has_key

parent 2ea3f1c4
......@@ -804,7 +804,7 @@ class Catalog(Folder,
for filt in root.getElementsByTagName("filter"):
id = str(filt.getAttribute("id"))
expression = filt.getAttribute("expression")
if not self.filter_dict.has_key(id):
if id not in self.filter_dict:
self.filter_dict[id] = PersistentMapping()
self.filter_dict[id]['filtered'] = 1
self.filter_dict[id]['type'] = []
......@@ -2648,7 +2648,7 @@ class Catalog(Folder,
for id in method_id_list:
# We will first look if the filter is activated
if not self.filter_dict.has_key(id):
if id not in self.filter_dict:
self.filter_dict[id] = PersistentMapping()
if REQUEST.has_key('%s_box' % id):
......
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