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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Iliya Manolov
erp5
Commits
aa742887
Commit
aa742887
authored
Oct 15, 2014
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Catalog.CatalogTool: Fix variable naming.
"to split" is an irregular verb. Also, drop badly-worded comment.
parent
a4b6500e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
product/ERP5Catalog/CatalogTool.py
product/ERP5Catalog/CatalogTool.py
+4
-6
No files found.
product/ERP5Catalog/CatalogTool.py
View file @
aa742887
...
...
@@ -910,15 +910,13 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
strict
=
1
key
=
key
[
len
(
strict_string
):]
prefix
=
prefix
+
strict_string
splitted_key
=
key
.
split
(
'_'
)
# look from the end of the key from the beginning if we
# can find 'title', or 'portal_type'...
for
i
in
xrange
(
len
(
splitted_key
)
-
1
,
0
,
-
1
):
expected_base_cat_id
=
'_'
.
join
(
splitted_key
[
0
:
i
])
split_key
=
key
.
split
(
'_'
)
for
i
in
xrange
(
len
(
split_key
)
-
1
,
0
,
-
1
):
expected_base_cat_id
=
'_'
.
join
(
split_key
[
0
:
i
])
if
expected_base_cat_id
!=
'parent'
and
\
expected_base_cat_id
in
base_cat_id_list
:
# We have found a base_category
end_key
=
'_'
.
join
(
split
ted
_key
[
i
:])
end_key
=
'_'
.
join
(
split_key
[
i
:])
related
=
end_key
.
startswith
(
related_string
)
if
related
:
end_key
=
end_key
[
len
(
related_string
):]
...
...
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