Skip to content

Commit

Permalink
Fix: saving a model removing unmodified attributes after consecutive …
Browse files Browse the repository at this point in the history
…save
  • Loading branch information
syphax-bouazzouni committed Apr 3, 2024
1 parent 85d7060 commit 66b68ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/goo/sparql/triples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def self.model_update_triples(model)
if model.previous_values
graph_delete = RDF::Graph.new
model.previous_values.each do |attr,value|
next unless model.modified_attributes.any?{|x| attr.eql?(x)}

predicate = model.class.attribute_uri(attr,model.collection)
values = value.kind_of?(Array) ? value : [value]
values.each do |v|
Expand Down

0 comments on commit 66b68ab

Please sign in to comment.