Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
763fab90
Commit
763fab90
authored
Sep 13, 2019
by
Guilhem Saurel
Browse files
fix switching in ordered_projects
parent
70b9eb48
Pipeline
#5651
passed with stage
in 44 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
763fab90
...
...
@@ -1188,8 +1188,9 @@ def ordered_projects():
# Ensure that py-XX is after XX
switch
=
[]
for
i
,
(
cat
,
pkg
)
in
enumerate
(
lst
):
if
pkg
.
startswith
(
'py-'
)
and
[
cat
,
pkg
[
3
:]]
in
lst
and
i
<
lst
.
index
([
cat
,
pkg
[
3
:]]):
switch
.
append
((
i
,
lst
.
index
([
cat
,
pkg
[
3
:]])))
main
=
(
cat
,
pkg
[
3
:])
if
pkg
.
startswith
(
'py-'
)
and
main
in
lst
and
i
<
lst
.
index
(
main
):
switch
.
append
((
i
,
lst
.
index
(
main
)))
for
old
,
new
in
switch
:
lst
[
old
],
lst
[
new
]
=
lst
[
new
],
lst
[
old
]
...
...
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