Closed lwrubel closed 2 years ago
If the hash passed to Cocina::Models.build has a symbol key for type instead of a string, fetch will produce a KeyError. https://github.com/sul-dlss/cocina-models/blob/7b0f205941511129d95d0c07ac0ba626b35038b5/lib/cocina/models.rb#L66
type
Consider using with_indifferent_access. on the hash before fetch.
with_indifferent_access.
fetch
If the hash passed to Cocina::Models.build has a symbol key for
type
instead of a string, fetch will produce a KeyError. https://github.com/sul-dlss/cocina-models/blob/7b0f205941511129d95d0c07ac0ba626b35038b5/lib/cocina/models.rb#L66Consider using
with_indifferent_access.
on the hash beforefetch
.