mysociety / yournextrepresentative

A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk/
GNU Affero General Public License v3.0
56 stars 21 forks source link

candidates have elected=FALSE even when their election's results haven't been reported. #925

Open jf1 opened 8 years ago

jf1 commented 8 years ago

I'd expect elected=NULL when no result has been reported, however in this ward all 10 candidates had elected=FALSE in csv downloads from May 10 and 11 despite the ward only having its results recorded by BrettonPE on May 12, 2016, 1:36 p.m.

Could all candidates whose results haven't yet been recorded be updated/reset so their elected=NULL ?

Ideally the votes and result_confirmed fields requested in https://github.com/mysociety/yournextrepresentative/issues/920 would be added first, then a script could fix the elected field and populate the two new fields at the same time.

mhl commented 8 years ago

All of the MembershipExtra objects associated with this ward do have have elected set to False rather than None:

In [2]: post = Post.objects.get(extra__slug='UTW:E05010815')

In [3]: for m in post.memberships.all():
   ...:     print m.extra.elected
   ...:     
False
False
False
False
False
False
False
False
False
False

In other words, this isn't a problem with the CSV generation.

@symroe - could you investigate whether the results recorder was doing something wrong for this ward? (The winner_count is 3.)