From 8c84c9ed0a050c592093853d0739e7c4f14f25df Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Wed, 23 Nov 2022 09:34:58 +0100 Subject: [PATCH] force attribute values with lang to be string --- lib/goo/sparql/mixins/solution_lang_filter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/goo/sparql/mixins/solution_lang_filter.rb b/lib/goo/sparql/mixins/solution_lang_filter.rb index fb4d116b..6c0205f0 100644 --- a/lib/goo/sparql/mixins/solution_lang_filter.rb +++ b/lib/goo/sparql/mixins/solution_lang_filter.rb @@ -78,8 +78,8 @@ def save_other_lang_val(id, attr, index, value) def matched_languages(index_values, model_attribute_val) not_matched_lang = index_values[:not_matched] matched_lang = index_values.reject { |key| key == :not_matched } - unless model_attribute_val.nil? || model_attribute_val.empty? - matched_lang[:no_lang] = Array(model_attribute_val) + unless model_attribute_val.nil? || model_attribute_val.to_s.empty? + matched_lang[:no_lang] = Array(model_attribute_val.to_s) end [matched_lang, not_matched_lang] end