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
Carlos Ramos Carreño
erp5
Commits
ee7084c9
Commit
ee7084c9
authored
Mar 08, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SyntaxWarning
parent
50952888
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5/Document/Resource.py
product/ERP5/Document/Resource.py
+3
-3
No files found.
product/ERP5/Document/Resource.py
View file @
ee7084c9
...
@@ -111,7 +111,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
...
@@ -111,7 +111,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
| morphology/2 | (colour/blue, colour/red, size/Man, size/Woman, morphology/2)
| morphology/2 | (colour/blue, colour/red, size/Man, size/Woman, morphology/2)
"""
"""
result
=
[]
result
=
[]
if
base_category_list
is
():
if
base_category_list
==
():
base_category_list
=
self
.
getVariationBaseCategoryList
(
base_category_list
=
self
.
getVariationBaseCategoryList
(
omit_individual_variation
=
omit_individual_variation
)
omit_individual_variation
=
omit_individual_variation
)
elif
isinstance
(
base_category_list
,
str
):
elif
isinstance
(
base_category_list
,
str
):
...
@@ -127,7 +127,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
...
@@ -127,7 +127,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
if
not
omit_individual_variation
:
if
not
omit_individual_variation
:
for
variation
in
individual_variation_list
:
for
variation
in
individual_variation_list
:
for
base_category
in
variation
.
getVariationBaseCategoryList
():
for
base_category
in
variation
.
getVariationBaseCategoryList
():
if
base_category_list
is
()
\
if
base_category_list
==
()
\
or
base_category
in
base_category_list
:
or
base_category
in
base_category_list
:
other_base_category_set
.
discard
(
base_category
)
other_base_category_set
.
discard
(
base_category
)
# XXX now, call Renderer a lot of time.
# XXX now, call Renderer a lot of time.
...
@@ -196,7 +196,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
...
@@ -196,7 +196,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
for
base_category
in
variation
.
getVariationBaseCategoryList
():
for
base_category
in
variation
.
getVariationBaseCategoryList
():
# backwards compatbility: if individual_bc_list is empty, allow
# backwards compatbility: if individual_bc_list is empty, allow
# all individual variation base categories.
# all individual variation base categories.
if
(
base_category_list
is
()
if
(
base_category_list
==
()
or
base_category
in
base_category_list
)
\
or
base_category
in
base_category_list
)
\
and
(
not
len
(
individual_bc_list
)
and
(
not
len
(
individual_bc_list
)
or
base_category
in
individual_bc_list
):
or
base_category
in
individual_bc_list
):
...
...
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