Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Porkepix
memopol
Commits
1c08eaf8
Commit
1c08eaf8
authored
Oct 11, 2016
by
Nicolas Joyard
Browse files
Fix committee vote inconsistencies
parent
ab657755
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/representatives_votes/contrib/parltrack/import_votes.py
View file @
1c08eaf8
...
...
@@ -51,16 +51,20 @@ class Command(object):
"""
Parse data from parltrack votes db dumps (1 proposal)
"""
if
'epref'
not
in
vote_data
.
keys
():
keys
=
vote_data
.
keys
()
if
'ep_ref'
in
keys
:
vote_data
[
'epref'
]
=
vote_data
[
'ep_ref'
]
elif
'epref'
not
in
keys
:
logger
.
debug
(
'Could not import data without epref %s'
,
vote_data
[
'title'
])
vote_data
.
get
(
'title'
,
vote_data
.
get
(
'doc'
,
vote_data
.
get
(
'url'
,
'?'
))))
return
dossier_pk
=
self
.
get_dossier
(
vote_data
[
'epref'
])
if
not
dossier_pk
:
logger
.
debug
(
'Cannot find dossier with remote id %s'
,
vote_data
[
'epref'
])
logger
.
debug
(
'Cannot find dossier with remote id %s'
,
epref
)
return
if
'committee'
in
vote_data
:
...
...
src/representatives_votes/contrib/parltrack/tests/votes_fixture.json
View file @
1c08eaf8
...
...
@@ -299,7 +299,7 @@
],
"total"
:
"1"
},
"epref"
:
"2012/2002(INI)"
,
"ep
_
ref"
:
"2012/2002(INI)"
,
"-"
:
{
"groups"
:
[
{
...
...
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