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
Labels
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
d60d0173
Commit
d60d0173
authored
Jul 30, 2014
by
Alain Takoudjou
Committed by
Rafael Monnerat
Nov 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Publication Date to sort Software Releases
parent
ea9a752a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+10
-1
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
d60d0173
...
@@ -386,9 +386,18 @@ class SlapTool(BaseTool):
...
@@ -386,9 +386,18 @@ class SlapTool(BaseTool):
raise
NotImplementedError
(
'Several Software Product with the same title.'
)
raise
NotImplementedError
(
'Several Software Product with the same title.'
)
software_release_list
=
\
software_release_list
=
\
software_product_list
[
0
].
getObject
().
getAggregateRelatedValueList
()
software_product_list
[
0
].
getObject
().
getAggregateRelatedValueList
()
def
sortkey
(
software_release
):
publication_date
=
software_release
.
getEffectiveDate
()
if
publication_date
:
if
(
publication_date
-
DateTime
())
>
0
:
return
DateTime
(
'1900/05/02'
)
return
publication_date
return
software_release
.
getCreationDate
()
software_release_list
=
sorted
(
software_release_list
=
sorted
(
software_release_list
,
software_release_list
,
key
=
lambda
software_release
:
software_release
.
getCreationDate
()
,
key
=
sortkey
,
reverse
=
True
,
reverse
=
True
,
)
)
return
xml_marshaller
.
xml_marshaller
.
dumps
(
return
xml_marshaller
.
xml_marshaller
.
dumps
(
...
...
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