Fix representative import
Update representatives exits before finishing:
+ parltrack_download_pipe ep_meps_current.json.xz parltrack_import_representatives
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -f ep_meps_current.json.xz ']'
+ '[' -n '' ']'
+ export DJANGO_SETTINGS_MODULE=memopol.settings
+ DJANGO_SETTINGS_MODULE=memopol.settings
+ parltrack_import_representatives
+ unxz -c ep_meps_current.json.xz
Traceback (most recent call last):
File "/home/jpic/work/lqdn/lqdn_env/bin/parltrack_import_representatives", line 11, in <module>
load_entry_point('political-memory', 'console_scripts', 'parltrack_import_representatives')()
File "/home/jpic/work/lqdn/political_memory/src/representatives/contrib/parltrack/import_representatives.py", line 423, in main
importer.manage_mep(data)
File "/home/jpic/work/lqdn/lqdn_env/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
return func(*args, **kwargs)
File "/home/jpic/work/lqdn/political_memory/src/representatives/contrib/parltrack/import_representatives.py", line 97, in manage_mep
_parse_date(mep_json["Birth"]["date"])
KeyError: 'Birth'
^C