From acf2d5f40707c250365879698f0239f1f22dea3f Mon Sep 17 00:00:00 2001 From: Julien Portalier Date: Thu, 20 Jul 2023 17:42:25 +0200 Subject: [PATCH] fixup! Fix: use data from samples directly in samples reports --- app/models/sample.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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