Skip to content

Commit

Permalink
Merge pull request #1004 from sul-dlss/cbeer-patch-3
Browse files Browse the repository at this point in the history
Downcase the provided hrid/catkey value when searching
  • Loading branch information
jcoyne authored Jul 25, 2023
2 parents 7b29ad5 + 200f65c commit d3d1c60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/traject/readers/folio_postgres_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize(_input_stream, settings)

# Return a single record by catkey by temporarily applying a SQL filter
def self.find_by_catkey(catkey, settings = {})
new(nil, settings.merge!('postgres.sql_filters' => "lower(sul_mod_inventory_storage.f_unaccent(vi.jsonb ->> 'hrid'::text)) = '#{catkey}'")).first
new(nil, settings.merge!('postgres.sql_filters' => "lower(sul_mod_inventory_storage.f_unaccent(vi.jsonb ->> 'hrid'::text)) = '#{catkey.downcase}'")).first
end

def default_filters
Expand Down

0 comments on commit d3d1c60

Please sign in to comment.