Commit 3ffa1e15 authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Eteri

ZSQLCatalog: Prefere using in instead of has_key

parent 4dda044a
......@@ -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