Skip to content

Commit

Permalink
🐛 pass loc as a string to location service
Browse files Browse the repository at this point in the history
Without passing a string, we get an error when based_near is nil. This was discovered when testing Bulkrax in a valkyrized app. When based_near is nil, Hyrax will create a new controlled vocab location object, which gets passed off to a lookup that failed in the #extract_id method.
  • Loading branch information
ShanaLMoore committed Apr 24, 2024
1 parent 42eccf4 commit 24cc25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/indexers/concerns/hyrax/location_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def to_solr

def based_near_label_lookup(locations)
locations.map do |loc|
location_service.full_label(loc)
location_service.full_label(loc.to_s)
end
end

Expand Down

0 comments on commit 24cc25b

Please sign in to comment.