Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amer
erp5
Commits
e1769b3f
Commit
e1769b3f
authored
Apr 04, 2017
by
Ayush Tiwari
Committed by
Vincent Pelletier
Jul 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZSQLCatalog: Prefere using in instead of has_key
parent
2ea3f1c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+2
-2
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
e1769b3f
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment