Skip to content

Commit 612a58f

Browse files
authored
Merge pull request #6706 from samvera/fault-tolerant-comparison
🐛 Favor fault tolerant comparison
2 parents 23d2d05 + 108a696 commit 612a58f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/hyrax/resource.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def work?
150150
end
151151

152152
def ==(other)
153-
attributes.except(:created_at, :updated_at) == other.attributes.except(:created_at, :updated_at)
153+
attributes.except(:created_at, :updated_at) == other.attributes.except(:created_at, :updated_at) if other.respond_to?(:attributes)
154154
end
155155

156156
def permission_manager

0 commit comments

Comments
 (0)