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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
erp5
Commits
530ffd79
Commit
530ffd79
authored
10 years ago
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZSQLCatalog: Drop a few single-use locals.
parent
129f97e3
master
environment_demo_notebook
environment_object
feature/print_redirection
feature/testnode-frontend
hotfix/import_exception
hotfix/matplotlib-figure-persist
hotfix/test-suite-parameters-line-length
import_exception_fix
improve_error_define_undefine
jupyter_error_handling
new_order_prediction_tutorial
order_prediction_pandas_numpy
order_prediction_tutorial_bt5
pivottablejs
print_redirection
shop-box-for-merge
shop-box-rebased
strict_catalog
timezones
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+9
-16
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
530ffd79
...
@@ -1097,8 +1097,7 @@ class Catalog(Folder,
...
@@ -1097,8 +1097,7 @@ class Catalog(Folder,
keys
=
set
()
keys
=
set
()
add_key
=
keys
.
add
add_key
=
keys
.
add
for
table
in
self
.
getCatalogSearchTableIds
():
for
table
in
self
.
getCatalogSearchTableIds
():
field_list
=
self
.
_getCatalogSchema
(
table
=
table
)
for
field
in
self
.
_getCatalogSchema
(
table
=
table
):
for
field
in
field_list
:
add_key
(
field
)
add_key
(
field
)
add_key
(
'%s.%s'
%
(
table
,
field
))
# Is this inconsistent ?
add_key
(
'%s.%s'
%
(
table
,
field
))
# Is this inconsistent ?
for
related
in
self
.
getSQLCatalogRelatedKeyList
():
for
related
in
self
.
getSQLCatalogRelatedKeyList
():
...
@@ -1143,14 +1142,11 @@ class Catalog(Folder,
...
@@ -1143,14 +1142,11 @@ class Catalog(Folder,
Calls the show column method and returns dictionnary of
Calls the show column method and returns dictionnary of
Field Ids
Field Ids
"""
"""
keys
=
{}
keys
=
set
()
for
table
in
self
.
getCatalogSearchTableIds
():
for
table
in
self
.
getCatalogSearchTableIds
():
field_list
=
self
.
_getCatalogSchema
(
table
=
table
)
for
field
in
self
.
_getCatalogSchema
(
table
=
table
):
for
field
in
field_list
:
keys
.
add
(
'%s.%s'
%
(
table
,
field
))
keys
[
'%s.%s'
%
(
table
,
field
)]
=
1
return
sorted
(
keys
)
keys
=
keys
.
keys
()
keys
.
sort
()
return
keys
@
transactional_cache_decorator
(
'SQLCatalog.getSortColumnIds'
)
@
transactional_cache_decorator
(
'SQLCatalog.getSortColumnIds'
)
@
caching_instance_method
(
id
=
'SQLCatalog.getSortColumnIds'
,
@
caching_instance_method
(
id
=
'SQLCatalog.getSortColumnIds'
,
...
@@ -1162,14 +1158,11 @@ class Catalog(Folder,
...
@@ -1162,14 +1158,11 @@ class Catalog(Folder,
Calls the show column method and returns dictionnary of
Calls the show column method and returns dictionnary of
Field Ids that can be used for a sort
Field Ids that can be used for a sort
"""
"""
keys
=
{}
keys
=
set
()
for
table
in
self
.
getTableIds
():
for
table
in
self
.
getTableIds
():
field_list
=
self
.
_getCatalogSchema
(
table
=
table
)
for
field
in
self
.
_getCatalogSchema
(
table
=
table
):
for
field
in
field_list
:
keys
.
add
(
'%s.%s'
%
(
table
,
field
))
keys
[
'%s.%s'
%
(
table
,
field
)]
=
1
return
sorted
(
keys
)
keys
=
keys
.
keys
()
keys
.
sort
()
return
keys
def
getTableIds
(
self
):
def
getTableIds
(
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