From 0456393317d8b2fc577438ca223ff247033b5fd6 Mon Sep 17 00:00:00 2001 From: zmagod Date: Tue, 25 Apr 2017 16:22:10 +0200 Subject: [PATCH] prevent to get nil as a param in checklist_item_annotation method [fixes SCI-1194] --- app/controllers/concerns/steps_actions.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/steps_actions.rb b/app/controllers/concerns/steps_actions.rb index 293c4b2e1..6e7e9c587 100644 --- a/app/controllers/concerns/steps_actions.rb +++ b/app/controllers/concerns/steps_actions.rb @@ -74,8 +74,9 @@ module StepsActions e.items.each do |ci| old_list = old_checklists.select { |i| i.id == e.id }.first old_item = old_list.items.select { |i| i.id == ci.id }.first if old_list - - checklist_item_annotation(step, ci, old_item.text) + text = old_item.text if old_item + text ||= '' + checklist_item_annotation(step, ci, text) end end end