Fix voters on booth not being created in dev seeds
There were validation errors because they didn't have officer nor booth assignments.
This commit is contained in:
@@ -114,12 +114,16 @@ end
|
||||
section "Creating Poll Voters" do
|
||||
|
||||
def vote_poll_on_booth(user, poll)
|
||||
officer = Poll::Officer.all.sample
|
||||
|
||||
Poll::Voter.create!(document_type: user.document_type,
|
||||
document_number: user.document_number,
|
||||
user: user,
|
||||
poll: poll,
|
||||
origin: "booth",
|
||||
officer: Poll::Officer.all.sample)
|
||||
officer: officer,
|
||||
officer_assignment: officer.officer_assignments.sample,
|
||||
booth_assignment: poll.booth_assignments.sample)
|
||||
end
|
||||
|
||||
def vote_poll_on_web(user, poll)
|
||||
|
||||
Reference in New Issue
Block a user