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
Roque
slapos.core
Commits
52d9c484
Commit
52d9c484
authored
Feb 10, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: Accept published_alive as a valid state.
Minor optimisations included.
parent
f8c69441
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareProduct_getSortedSoftwareReleaseList.xml
...apos_pdm/SoftwareProduct_getSortedSoftwareReleaseList.xml
+9
-3
No files found.
master/bt5/slapos_pdm/SkinTemplateItem/portal_skins/slapos_pdm/SoftwareProduct_getSortedSoftwareReleaseList.xml
View file @
52d9c484
...
...
@@ -56,6 +56,9 @@ from DateTime import DateTime\n
\n
portal = context.getPortalObject()\n
\n
if context.getPortalType() == "Software Product":\n
software_product_reference = context.getReference()\n
\n
if software_product_reference is None:\n
assert(software_release_url is not None)\n
software_release = portal.portal_catalog.getResultValue(\n
...
...
@@ -64,6 +67,7 @@ if software_product_reference is None:\n
)\n
if not software_release:\n
return []\n
\n
software_product_reference = software_release.getAggregateReference()\n
if not software_product_reference:\n
return []\n
...
...
@@ -75,12 +79,14 @@ else:\n
product_list = portal.portal_catalog(\n
portal_type=\'Software Product\',\n
reference=software_product_reference,\n
validation_state=\'published\')\n
validation_state=\'published\', \n
limit=2)\n
\n
if not product_list:\n
return []\n
\n
if len(product_list) >
1:\n
raise
NotImplementedError(\'Several Software Product with the same titl
e.\')\n
raise
ValueError(\'Several Software Product with the same referenc
e.\')\n
\n
software_release_list = product_list[0].getAggregateRelatedValueList()\n
\n
...
...
@@ -99,7 +105,7 @@ software_release_list = sorted(\n
\n
return [software_release for software_release in software_release_list\n
if software_release.getValidationState() in\n
["published"]\n
["published"
, "published_alive"
]\n
]\n
...
...
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