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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
74aa5a3e
Commit
74aa5a3e
authored
Sep 29, 2022
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: search for Software Product Release Variation
parent
a2ced501
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/InstanceTree_getSoftwareProduct.py
...tal_skins/slapos_cloud/InstanceTree_getSoftwareProduct.py
+12
-11
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/InstanceTree_getSoftwareProduct.py
View file @
74aa5a3e
...
...
@@ -2,19 +2,20 @@ portal = context.getPortalObject()
url_string
=
context
.
getUrlString
()
software_product
=
None
product_list
=
portal
.
portal_catalog
(
portal_type
=
"Software Product"
,
validation_state
=
[
'validated'
,
'published'
],
use__relative_url
=
"trade/sale"
,
follow_up__uid
=
context
.
getFollowUpUid
()
)
release
=
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Software Release"
,
url_string
=
url_string
,
follow_up__uid
=
context
.
getFollowUpUid
(),
validation_state
=
[
'shared'
,
'shared_alive'
,
'released'
,
'released_alive'
,
'published'
,
'published_alive'
]
portal_type
=
"Software Product Release Variation"
,
url_string
=
url_string
,
parent_uid
=
[
x
.
getUid
()
for
x
in
product_list
]
)
if
release
is
not
None
:
software_product
=
release
.
getAggregateValue
(
checked_permission
=
'Access contents information'
)
if
software_product
is
not
None
:
if
software_product
.
getValidationState
()
not
in
[
'validated'
,
'published'
]:
software_product
=
None
software_product
=
release
.
getParentValue
()
return
software_product
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