diff --git a/app/models/transfer/state.rb b/app/models/transfer/state.rb index bd35775706..082eb52dc1 100644 --- a/app/models/transfer/state.rb +++ b/app/models/transfer/state.rb @@ -67,7 +67,7 @@ def self.included(base) # rubocop:todo Metrics/MethodLength states = Array(states).map(&:to_s) # If all of the states are present there is no point in actually adding this set of conditions because - # we're basically looking for all of the plates. + # we're basically looking for all of the tubes. if states.sort != ALL_STATES.sort join_options = [ # rubocop:todo Layout/LineLength diff --git a/app/resources/api/v2/shared_behaviour/labware.rb b/app/resources/api/v2/shared_behaviour/labware.rb index 789e2614e1..943e29a134 100644 --- a/app/resources/api/v2/shared_behaviour/labware.rb +++ b/app/resources/api/v2/shared_behaviour/labware.rb @@ -62,6 +62,7 @@ module Labware filter :updated_at_gt, apply: lambda { |records, value, _options| records.where('labware.updated_at > ?', value[0].to_date) } filter :include_used, apply: ->(records, value, _options) { records.include_labware_with_children(value) } + filter :state, apply: ->(records, value, _options) { records.in_state(value.flatten) } end # Custom methods