sul-dlss-deprecated / dor-services

Common services, models, and utility classes used by the Stanford Digital Repository (DOR == Digital Object Registry)
Other
8 stars 4 forks source link

Make use_statement and copyright writeable #719

Closed jcoyne closed 4 years ago

jcoyne commented 4 years ago

When the source xml has no existing nodes

Why was this change made?

Fixes:

item = Dor::Item.new
item.rightsMetadata.content = "<?xml version=\"1.0\"?>\n<rightsMetadata>\n <access type
=\"discover\">\n <machine>\n <none/>\n </machine>\n </access>\n <access type=\"r
ead\">\n <machine>\n <none/>\n </machine>\n </access>\n</rightsMetadata>\n"
item.rightsMetadata.copyright = 'foo'
Traceback (most recent call last):
2: from (irb):6
1: from (eval):1:in `block (2 levels) in insert_from_template'
NoMethodError (undefined method `human' for #<Dor::RightsMetadataDS:0x000000000326d420>)

See https://app.honeybadger.io/projects/50568/faults/68130941

How was this change tested?

Which documentation and/or configurations were updated?