Skip to content

Commit

Permalink
Sort pulled live_times by absolute time as primary key.
Browse files Browse the repository at this point in the history
  • Loading branch information
moveson committed Feb 19, 2018
1 parent cfa2abd commit c7c2337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/event_groups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def pull_live_time_rows
live_times_limit = (params[:page] && params[:page][:size]) || live_times_default_limit

scoped_live_times = force_pull ? @resource.live_times.unmatched : @resource.live_times.unconsidered
selected_live_times = scoped_live_times.order(:event_id, :split_id, :bib_number, :bitkey).limit(live_times_limit)
selected_live_times = scoped_live_times.order(:absolute_time, :event_id, :bib_number, :split_id, :bitkey).limit(live_times_limit)

grouped_live_times = selected_live_times.group_by(&:event_id)

Expand Down

0 comments on commit c7c2337

Please sign in to comment.