Skip to content

Commit

Permalink
Revert ObjectFactory#find method returning false instead of nil on mi…
Browse files Browse the repository at this point in the history
…ssing object (#1000)

the find method changed from returning nil to returning false in Hyrax 4 valkyrie support (#872). several bugs around this change have been guarded against, but a full audit was done and there is nothing that requires this method to continue to return false and several places that still expect it to be nil. So we are reverting to nil when an object isnt found in the factory
  • Loading branch information
orangewolf authored Dec 20, 2024
1 parent d5b64bc commit 76023a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/factories/bulkrax/object_factory_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ def delete(_user)
#
# @return [Object] when we've found the object by the entry's :id or by it's
# source_identifier
# @return [FalseClass] when we cannot find the object.
# @return [NilClass] when we cannot find the object.
def find
find_by_id || search_by_identifier || false
find_by_id || search_by_identifier || nil
end

##
Expand Down

0 comments on commit 76023a9

Please sign in to comment.