diff --git a/app/models/sample.rb b/app/models/sample.rb index 8b2eb2c64..f5768ca27 100644 --- a/app/models/sample.rb +++ b/app/models/sample.rb @@ -20,7 +20,7 @@ def self.institution_is_required has_many :test_results, through: :sample_identifiers has_many :samples_reports, through: :samples_report_samples - has_many :samples_report_samples + has_many :samples_report_samples, dependent: :destroy has_many :assay_attachments, dependent: :destroy accepts_nested_attributes_for :assay_attachments, allow_destroy: true