diff --git a/.release-version b/.release-version index 4a788a01d..c3f6bdc3d 100644 --- a/.release-version +++ b/.release-version @@ -1 +1 @@ -3.6.3 +3.6.4 \ No newline at end of file diff --git a/app/models/pacbio/well_library.rb b/app/models/pacbio/well_library.rb index 1be7d4f2e..ad4588092 100644 --- a/app/models/pacbio/well_library.rb +++ b/app/models/pacbio/well_library.rb @@ -10,6 +10,6 @@ class WellLibrary < ApplicationRecord belongs_to :library, class_name: 'Pacbio::Library', foreign_key: :pacbio_library_id, inverse_of: :well_libraries - delegate :barcode, to: :library + delegate :barcode, to: :library, allow_nil: true end end diff --git a/spec/models/pacbio/well_library_spec.rb b/spec/models/pacbio/well_library_spec.rb index 12c6cd09f..f076325a8 100644 --- a/spec/models/pacbio/well_library_spec.rb +++ b/spec/models/pacbio/well_library_spec.rb @@ -17,4 +17,10 @@ expect(well_library.barcode).to be_present end + it 'if the well is nil the barcode will be nil' do + well_library = build(:pacbio_well_library, library: nil) + expect(well_library.barcode).to be_nil + + end + end