Closed struan closed 8 years ago
The dynamic election adding on the DC fork makes this slightly awkward, because it only lets you add candidacies of posts in current elections. We could mark the 2010 election current briefly, in order to make it available to choose again, but it might be easier to put them back in the Django shell - the following seems to work for me:
$ ./manage.py shell_plus
[...]
In [1]: election = Election.objects.get(slug='2010')
In [2]: person = Person.objects.get(name='Therese Coffey')
In [3]: post = Post.objects.get(label='Member of Parliament for Suffolk Coastal')
In [4]: party = Organization.objects.get(name__contains='Conservative and Unionist', party_sets__slug='gb')
In [5]: m = Membership.objects.create(role='Candidate', person=person, on_behalf_of=party, post=post)
In [6]: MembershipExtra.objects.create(base=m, elected=True, election=election)
Out[6]: <MembershipExtra: MembershipExtra object>
In [7]: person = Person.objects.get(name='Tom Greatrex')
In [8]: post = Post.objects.get(label='Member of Parliament for Rutherglen and Hamilton West')
In [9]: party = Organization.objects.get(name='Labour and Co-operative Party', party_sets__slug='gb')
In [10]: m = Membership.objects.create(role='Candidate', person=person, on_behalf_of=party, post=post)
In [11]: MembershipExtra.objects.create(base=m, elected=True, election=election)
Out[11]: <MembershipExtra: MembershipExtra object>
@symroe Do you mind if I run the above on the DC server?
Terese Coffey and Tom Greatrex are missing candidate memberships for the 2010 election.