Skip to content

Commit

Permalink
Fix displaying scalar collection items
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Dec 13, 2018
1 parent 44d9592 commit da3a6f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/y2configuration_management/widgets/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ def selected_row
# @return [Array<Array<String|Yast::Term>>]
def format_items(items_list)
items_list.each_with_index.map do |item, index|
values = headers_ids.map { |h| item[h] }
values = if item.is_a? Hash
headers_ids.map { |h| item[h] }
else
[item]
end
Item(Id(index.to_s), *values)
end
end
Expand Down

0 comments on commit da3a6f2

Please sign in to comment.