-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Method clean_end_punctuation in marc_export.rb throws an exception if the value passed is nil
blacklight-marc/app/models/concerns/blacklight/solr/document/marc_export.rb
Lines 493 to 498 in db85fe3
| def clean_end_punctuation(text) | |
| if [".",",",":",";","/"].include? text[-1,1] | |
| return text[0,text.length-1] | |
| end | |
| text | |
| end |
This is a problem when chicago_citation(marc) is called with a nil value for marc["502"]["d"]. This is the block that makes the call to clean_end_punctuation with nil
blacklight-marc/app/models/concerns/blacklight/solr/document/marc_export.rb
Lines 303 to 305 in db85fe3
| elsif marc["502"] and (marc["502"]["b"] or marc["502"]["c"] or marc["502"]["d"]) #sometimes the dissertation note is encoded in pieces in the $b $c and $d sub fields instead of lumped into the $a | |
| pub_info << "#{marc["502"]["b"]}, #{marc["502"]["c"]}, #{clean_end_punctuation(marc["502"]["d"])}" | |
| end |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels