create officer assignments in order
Make sure we create the Poll::OfficerAssignments in the same order the booth_assignments where previously created. So the spec "Poll::Shift officer_assignments creates and destroy corresponding officer_assignments does" not fail.
This commit is contained in:
@@ -24,7 +24,7 @@ class Poll
|
||||
end
|
||||
|
||||
def create_officer_assignments
|
||||
booth.booth_assignments.each do |booth_assignment|
|
||||
booth.booth_assignments.order(:id).each do |booth_assignment|
|
||||
attrs = {
|
||||
officer_id: officer_id,
|
||||
date: date,
|
||||
|
||||
Reference in New Issue
Block a user