From c4421a3bcb6262c0025e20d59f0dcc9be5f3475b Mon Sep 17 00:00:00 2001 From: Stephen <519327+stevieing@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:23:56 +0100 Subject: [PATCH] Refactor Aliquot#tagged? method to handle sample sheet generation behavior --- app/models/aliquot.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/aliquot.rb b/app/models/aliquot.rb index 857360176..de2204a03 100644 --- a/app/models/aliquot.rb +++ b/app/models/aliquot.rb @@ -50,7 +50,10 @@ def sample_sheet_behaviour # # @return [Boolean] Returns true if the aliquot is tagged, false otherwise. def tagged? - tag.present? + # This feels like a bit of a hack but I wasn't exactly sure where the best place to + # it. I tried to follow the sample sheet behaviour but got lost. + # it looks like the only place this is used is in the sample sheet generation + tag.present? && tag_set&.sample_sheet_behaviour != :hidden end # Generic method used by pacbio sample sheet generation to