From 24acad1954274bbb0c68d2ae6e74f9f8039506dc Mon Sep 17 00:00:00 2001 From: Bilel KIHAL Date: Wed, 13 Nov 2024 17:46:15 +0100 Subject: [PATCH] prevent display home portal tooltip if we get a non complete data --- app/controllers/home_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 068d217b8..0ebd2946f 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -48,8 +48,10 @@ def portal_config @config = $PORTALS_INSTANCES.select { |x| x[:name].downcase.eql?((params[:portal] || helpers.portal_name).downcase) }.first if @config && @config[:api] @portal_config = LinkedData::Client::Models::Ontology.top_level_links(@config[:api]).to_h + return @portal_config = {} if @portal_config.any?{|_, value| value.blank?} + return @portal_config else - @portal_config = {} + return @portal_config = {} end end