Skip to content

Commit

Permalink
force attribute values with lang to be Array
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Nov 25, 2022
1 parent c7106bd commit 34a9fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/goo/sparql/mixins/solution_lang_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ 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?
unless model_attribute_val.nil? || Array(model_attribute_val).empty?
matched_lang[:no_lang] = Array(model_attribute_val)
end
[matched_lang, not_matched_lang]
Expand Down

0 comments on commit 34a9fdf

Please sign in to comment.