Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Titouan Soulard
slapos.core
Commits
24a00523
Commit
24a00523
authored
Dec 05, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: return nothing is no Software Product is found
parent
91a80561
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/InstanceTree_getSoftwareProduct.py
...tal_skins/slapos_cloud/InstanceTree_getSoftwareProduct.py
+18
-16
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/InstanceTree_getSoftwareProduct.py
View file @
24a00523
...
@@ -4,20 +4,22 @@ software_product = None
...
@@ -4,20 +4,22 @@ software_product = None
software_release
=
None
software_release
=
None
software_type
=
None
software_type
=
None
use_category_uid
=
portal
.
restrictedTraverse
(
"portal_categories/use/trade/sale"
).
getUid
(),
product_list
=
portal
.
portal_catalog
(
product_list
=
portal
.
portal_catalog
(
portal_type
=
"Software Product"
,
portal_type
=
"Software Product"
,
validation_state
=
[
'validated'
,
'published'
],
validation_state
=
[
'validated'
,
'published'
],
use__
relative_url
=
"trade/sale"
,
use__
uid
=
use_category_uid
,
follow_up__uid
=
context
.
getFollowUpUid
()
follow_up__uid
=
context
.
getFollowUpUid
()
)
)
software_release
=
portal
.
portal_catalog
.
getResultValue
(
if
len
(
product_list
)
!=
0
:
software_release
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Software Product Release Variation"
,
portal_type
=
"Software Product Release Variation"
,
url_string
=
url_string
,
url_string
=
url_string
,
parent_uid
=
[
x
.
getUid
()
for
x
in
product_list
]
parent_uid
=
[
x
.
getUid
()
for
x
in
product_list
]
)
)
if
software_release
is
not
None
:
if
software_release
is
not
None
:
software_product
=
software_release
.
getParentValue
()
software_product
=
software_release
.
getParentValue
()
software_type
=
portal
.
portal_catalog
.
getResultValue
(
software_type
=
portal
.
portal_catalog
.
getResultValue
(
...
...
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