prevent to get nil as a param in checklist_item_annotation method [fixes SCI-1194]

This commit is contained in:
zmagod 2017-04-25 16:22:10 +02:00
parent b930af0033
commit 0456393317

View file

@ -74,8 +74,9 @@ module StepsActions
e.items.each do |ci| e.items.each do |ci|
old_list = old_checklists.select { |i| i.id == e.id }.first 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 old_item = old_list.items.select { |i| i.id == ci.id }.first if old_list
text = old_item.text if old_item
checklist_item_annotation(step, ci, old_item.text) text ||= ''
checklist_item_annotation(step, ci, text)
end end
end end
end end