From 7a90bc0f9e29c09df853a759207e017c912971f9 Mon Sep 17 00:00:00 2001 From: Syphax bouazzouni Date: Wed, 28 Feb 2024 17:08:33 +0100 Subject: [PATCH] fix landscape page raising error for groups does not have a description --- app/controllers/landscape_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/landscape_controller.rb b/app/controllers/landscape_controller.rb index 77507813f..45128cb16 100644 --- a/app/controllers/landscape_controller.rb +++ b/app/controllers/landscape_controller.rb @@ -542,7 +542,7 @@ def index groups_info_hash[group.acronym][:name] = group.name groups_info_hash[group.acronym][:description] = [] # Slice the description in 6 words string to avoid too long sentence in the bar chart tooltip in js - group.description.split(" ").each_slice(6) {|slice| groups_info_hash[group.acronym][:description].push(slice.join(" ")) } + group.description.split(" ").each_slice(6) {|slice| groups_info_hash[group.acronym][:description].push(slice.join(" ")) } if group.description end domains_info_hash = {} @@ -552,7 +552,7 @@ def index domains_info_hash[domain.acronym][:name] = domain.name domains_info_hash[domain.acronym][:description] = [] # Slice the description in 6 words string to avoid too long sentence in the bar chart tooltip in js - domain.description.split(" ").each_slice(6) {|slice| domains_info_hash[domain.acronym][:description].push(slice.join(" ")) } + domain.description.split(" ").each_slice(6) {|slice| domains_info_hash[domain.acronym][:description].push(slice.join(" ")) } if domain.description end @landscape_data = {