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
Political Memory
memopol
Commits
3425cadb
Commit
3425cadb
authored
Feb 11, 2016
by
Nicolas Joyard
Browse files
Francedata: set constituency country
parent
85514545
Changes
2
Hide whitespace changes
Inline
Side-by-side
representatives/contrib/francedata/import_representatives.py
View file @
3425cadb
...
...
@@ -195,7 +195,8 @@ class FranceDataImporter(GenericImporter):
self
.
france
=
Country
.
objects
.
get
(
name
=
"France"
)
self
.
variant
=
FranceDataVariants
[
variant
]
self
.
variant_constituency
,
_
=
Constituency
.
objects
.
get_or_create
(
name
=
self
.
variant
[
'constituency_name'
])
name
=
self
.
variant
[
'constituency_name'
],
country
=
self
.
france
)
@
transaction
.
atomic
def
manage_rep
(
self
,
rep_json
):
...
...
representatives/contrib/francedata/tests/deputes_expected.json
View file @
3425cadb
...
...
@@ -474,7 +474,7 @@
},
{
"fields"
:
{
"country"
:
null
,
"country"
:
1095
,
"name"
:
"Assembl
\u
00e9e nationale"
},
"model"
:
"representatives.constituency"
,
...
...
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