sul-dlss-deprecated / dor_indexing_app

An indexing API for Stanford's Digital Object Repository
https://sul-dlss-deprecated.github.io/dor_indexing_app/
Apache License 2.0
0 stars 2 forks source link

[dor_indexing_app/stage] NoMethodError: undefined method `year' for nil:NilClass #1018

Closed justinlittman closed 1 year ago

justinlittman commented 1 year ago

Backtrace

line 28 of [PROJECT_ROOT]/app/indexers/descriptive_metadata_indexer.rb: to_solr
line 28 of [PROJECT_ROOT]/app/indexers/composite_indexer.rb: map
line 28 of [PROJECT_ROOT]/app/indexers/composite_indexer.rb: to_solr

View full backtrace and more info at honeybadger.io

justinlittman commented 1 year ago

image

The problem is that the year is invalid:

d = Date.edtf('1uuu')
=> nil
justinlittman commented 1 year ago

Which could be fixed here: https://github.com/sul-dlss/stanford-mods/blob/master/lib/stanford-mods/imprint.rb#L147