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
Debian New Member Process
contributors.debian.org
Commits
b96f6a21
Verified
Commit
b96f6a21
authored
Sep 14, 2020
by
Mattia Rizzolo
Browse files
Merge branch 'master' of salsa.debian.org:subhadig/contributors.debian.org into master
MR:
!10
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parents
0a9aafa9
b240804c
Pipeline
#176461
passed with stage
in 1 minute and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
importer/importer.py
View file @
b96f6a21
...
...
@@ -3,6 +3,7 @@ from debiancontributors import parser
from
django.utils
import
timezone
from
django.conf
import
settings
import
django.http
from
requests.utils
import
requote_uri
from
.models
import
Submission
,
SubmissionLog
from
.batch
import
BatchImport
from
importer
import
serializers
...
...
@@ -178,6 +179,8 @@ class DataImporterV1:
models
.
Source
.
import_json
(
data
[
"sources"
])
log
.
info
(
f
"Imported
{
len
(
data
[
'sources'
])
}
sources"
)
self
.
encode_contribution_urls
(
data
[
"contributions"
])
sers
=
{
"users"
:
serializers
.
UserSerializer
,
"identifiers"
:
serializers
.
IdentifierSerializer
,
...
...
@@ -196,3 +199,8 @@ class DataImporterV1:
models
.
AggregatedPersonContribution
.
recompute
()
models
.
AggregatedSource
.
recompute
()
models
.
AggregatedPerson
.
recompute
()
def
encode_contribution_urls
(
self
,
contributions
):
for
cont
in
contributions
:
if
cont
[
"url"
]:
cont
[
"url"
]
=
requote_uri
(
cont
[
"url"
])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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