Skip to content

Commit

Permalink
[wip] Ensuring that deduplication exists for certain cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Sep 27, 2022
1 parent e629829 commit 49c1203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/active_fedora/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ def load_proxy_associations
if child_reflection.klass == proxy.class
ordered_association = association(r.name)
#ordered_association.add_to_target(proxy)
ordered_association.target.append_target(proxy)
#binding.pry
if !ordered_association.target_reader.to_a.include?(proxy)
ordered_association.target.append_target(proxy)
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/active_fedora/orders/ordered_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Orders
class OrderedList
include Enumerable
attr_reader :graph, :head_subject, :tail_subject
attr_writer :head, :tail
attr_writer :head, :tail, :changed
delegate :each, to: :ordered_reader
delegate :length, to: :to_a
# @param [::RDF::Enumerable] graph Enumerable where ORE statements are
Expand Down

0 comments on commit 49c1203

Please sign in to comment.