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
a0f69168
Commit
a0f69168
authored
Jan 08, 2018
by
Guilhem Saurel
Browse files
populate might be launched several times
parent
3ccd2e5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
rainboard/management/commands/populate.py
View file @
a0f69168
...
...
@@ -12,7 +12,8 @@ class Command(BaseCommand):
github
=
Forge
.
objects
.
get
(
name
=
'Github'
)
for
data
in
requests
.
get
(
f
'
{
github
.
api_url
()
}
/licenses'
,
headers
=
github
.
headers
()).
json
():
License
.
objects
.
create
(
github_key
=
data
[
'key'
],
**
{
key
:
data
[
key
]
for
key
in
[
'name'
,
'spdx_id'
,
'url'
]})
License
.
objects
.
get_or_create
(
github_key
=
data
[
'key'
],
**
{
key
:
data
[
key
]
for
key
in
[
'name'
,
'spdx_id'
,
'url'
]})
for
forge
in
Forge
.
objects
.
all
():
forge
.
get_projects
()
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