Skip to content

Commit

Permalink
Sample boxes in inventory & labels arranged by id (#1992)
Browse files Browse the repository at this point in the history
* Sample boxes in inventary & labels arranged by id

* Update app/controllers/boxes_controller.rb

Co-authored-by: Julien Portalier <[email protected]>

---------

Co-authored-by: Julien Portalier <[email protected]>
  • Loading branch information
leandroradusky and ysbaddaden committed Sep 14, 2023
1 parent b3e0d00 commit 377de9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/boxes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def load_box_samples
samples = if @box.blinded? && !params[:unblind]
samples.scrambled
else
samples.sort_by{ |sample| [ sample.batch_number.to_s, sample.concentration , sample.replicate ] }
samples.order(:id)
end
SamplePresenter.map(samples, request.format, unblind: params[:unblind])
end
Expand Down

0 comments on commit 377de9a

Please sign in to comment.