Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hardik Juneja
erp5
Commits
61b89012
Commit
61b89012
authored
8 years ago
by
Vincent Pelletier
Committed by
Sebastien Robin
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
SQLCatalog.getCatalogSearchTableIds: Simplify.
parent
98e6dbad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+6
-12
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
61b89012
...
...
@@ -1063,18 +1063,12 @@ class Catalog(Folder,
"""Return selected tables of catalog which are used in JOIN.
catalaog is always first
"""
search_tables
=
self
.
sql_search_tables
if
len
(
search_tables
)
>
0
:
if
search_tables
[
0
]
!=
'catalog'
:
result
=
[
'catalog'
]
for
t
in
search_tables
:
if
t
!=
'catalog'
:
result
.
append
(
t
)
self
.
sql_search_tables
=
result
else
:
self
.
sql_search_tables
=
[
'catalog'
]
return
self
.
sql_search_tables
search_tables
=
list
(
self
.
sql_search_tables
)
or
[
'catalog'
]
if
search_tables
[
0
]
!=
'catalog'
:
search_tables
=
[
'catalog'
]
+
[
x
for
x
in
search_tables
if
x
!=
'catalog'
]
# XXX: cast to tuple to avoid a mutable persistent property ?
self
.
sql_search_tables
=
search_tables
return
search_tables
security
.
declarePublic
(
'getCatalogSearchResultKeys'
)
def
getCatalogSearchResultKeys
(
self
):
...
...
This diff is collapsed.
Click to expand it.
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