Couple more thoughts.
I noticed on the screenshot that the email field is empty on one of the lines. Helios won’t let me upload a file which has a missing email.
My understanding of the flow of the code - in case you want to dig deeper with breakpoints etc. and are able to re-run the processing of the file:
- the page in your sceenshot is helios-server/helios/templates/voters_list.html (
https://github.com/benadida/helios-server/blob/master/helios/templates/voters_list.html )
- the number of voters loaded (ie 4590 in your screenshot) is given by vf.num_voters on line 72
- vf is an element of a voter_files array
- the number of voters given in the paginator (ie 2379) is given by total_voters on line 106
- voter_files and total_voters are determined in helios-server/helios/views.py on lines 1205 and 1220
- total_voters is determined from an instance of the Django Paginator (1217) and the paginator is instantiated with the ‘voters’ variable which is assigned on line 1209.
- the assignment on line 1209 limits the number of voters to just those voters in the current election
- the processing of the voter file is handled by a celery task at line 122 in helios-server/helios/tasks.py (
https://github.com/benadida/helios-server/blob/master/helios/tasks.py )
- a voter file is passed in to this function
- it calls voter_file.process() at line 124 which is a method of the VoterFile class and is defined at line 788 in helios-server/helios/models.py
- on line 801 it checks whether the voter already exists and only creates a voter (line 804) if there is no existing voter with the same id for the same election
- prior to that on line 797 it calls itervoters()
- itervoters() on line 764 reads in the content of the csv file. This might be a good point to examine what it is reading in and following through to what it saves as voters
Hope this provides some indications on where to start looking.