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
Tatuya Kamada
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):
...
@@ -910,15 +910,13 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
strict
=
1
strict
=
1
key
=
key
[
len
(
strict_string
):]
key
=
key
[
len
(
strict_string
):]
prefix
=
prefix
+
strict_string
prefix
=
prefix
+
strict_string
splitted_key
=
key
.
split
(
'_'
)
split_key
=
key
.
split
(
'_'
)
# look from the end of the key from the beginning if we
for
i
in
xrange
(
len
(
split_key
)
-
1
,
0
,
-
1
):
# can find 'title', or 'portal_type'...
expected_base_cat_id
=
'_'
.
join
(
split_key
[
0
:
i
])
for
i
in
xrange
(
len
(
splitted_key
)
-
1
,
0
,
-
1
):
expected_base_cat_id
=
'_'
.
join
(
splitted_key
[
0
:
i
])
if
expected_base_cat_id
!=
'parent'
and
\
if
expected_base_cat_id
!=
'parent'
and
\
expected_base_cat_id
in
base_cat_id_list
:
expected_base_cat_id
in
base_cat_id_list
:
# We have found a base_category
# 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
)
related
=
end_key
.
startswith
(
related_string
)
if
related
:
if
related
:
end_key
=
end_key
[
len
(
related_string
):]
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