From 1f28517fcdc0fa2abc2b8299b8fd4e61594a26b0 Mon Sep 17 00:00:00 2001 From: Andrej Date: Wed, 10 Jul 2024 12:07:40 +0200 Subject: [PATCH] Show correct checklist preview on invnetory import [SCI-10854] --- app/models/repository_checklist_value.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/repository_checklist_value.rb b/app/models/repository_checklist_value.rb index 4029e67db..ab5fde9f8 100644 --- a/app/models/repository_checklist_value.rb +++ b/app/models/repository_checklist_value.rb @@ -22,7 +22,8 @@ class RepositoryChecklistValue < ApplicationRecord EXTRA_PRELOAD_INCLUDE = :repository_checklist_items def formatted(separator: ' | ') - repository_checklist_items.pluck(:data).join(separator) + checklist_items = current_repository_checklist_items || repository_checklist_items + checklist_items.pluck(:data).join(separator) end def export_formatted