diff --git a/app/models/request_type.rb b/app/models/request_type.rb index 1a5b2c21af..0f4f59d3c3 100644 --- a/app/models/request_type.rb +++ b/app/models/request_type.rb @@ -82,7 +82,7 @@ class RequestTypePlatePurpose < ApplicationRecord # eg. library_creation has a lower order than sequencing validates :order, presence: true validates :order, numericality: { integer_only: true } - validates :morphology, numericality: { in: 0..2 } # 0..2 is the range of morphologies as defined in ln36-41 + validates :morphology, numericality: { in: 0...MORPHOLOGIES.length } validates :request_class, presence: true, inclusion: { in: ->(_) { [Request, *Request.descendants] } } serialize :request_parameters