Skip to content

Commit

Permalink
fix save_model_values method to not save RDF:Literal object but a string
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jul 14, 2023
1 parent ae7be1f commit a990260
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/goo/sparql/mixins/solution_lang_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ def save_model_values(model, values, predicate, unmapped)
add_unmapped_to_model(model, predicate, values)

else
values = values.map { |k, v| [k, v.first] }.to_h unless list_attributes?(predicate)
values = values.map do |language, values_literals|
values_string = values_literals.map{|x| x.object}
values_string = values_string.first unless list_attributes?(predicate)
[language, values_string]
end.to_h

model.send("#{predicate}=", values, on_load: true)
end
Expand Down

0 comments on commit a990260

Please sign in to comment.