Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Porkepix
memopol
Commits
1c08eaf8
Commit
1c08eaf8
authored
Oct 11, 2016
by
Nicolas Joyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix committee vote inconsistencies
parent
ab657755
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
src/representatives_votes/contrib/parltrack/import_votes.py
src/representatives_votes/contrib/parltrack/import_votes.py
+8
-4
src/representatives_votes/contrib/parltrack/tests/votes_fixture.json
...ntatives_votes/contrib/parltrack/tests/votes_fixture.json
+1
-1
No files found.
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
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