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
Mikolaï Krol
erp5
Commits
530ffd79
Commit
530ffd79
authored
Jun 30, 2014
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZSQLCatalog: Drop a few single-use locals.
parent
129f97e3
Changes
1
Show 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
):
"""
"""
...
...
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