diff --git a/app/sequencescape/sequencescape/api/v2/tube_rack.rb b/app/sequencescape/sequencescape/api/v2/tube_rack.rb index 849b97853..5c07bb1a8 100644 --- a/app/sequencescape/sequencescape/api/v2/tube_rack.rb +++ b/app/sequencescape/sequencescape/api/v2/tube_rack.rb @@ -60,6 +60,10 @@ def self.find_by(params) Sequencescape::Api::V2::TubeRack.includes(*includes).find(**options).first end + def self.find_all(options, includes: DEFAULT_INCLUDES) + Sequencescape::Api::V2::TubeRack.includes(*includes).where(**options).all + end + # This method sorts the racked tubes by their coordinate, taking into account both row and column parts. # Sorts by column first and then by row. #