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

add_virtual_resource: allow parent to have no existing resources (master branch) #653

Closed ndushay closed 4 years ago

ndushay commented 4 years ago

Connects to #651

add_virtual_resource was failing because the parent contentMetadata had no resources; this allows it to start with 0 resources (e.g. when the --purge flag is set for virtual-merge script in dor-utils)

This is on the master branch so the fix will be carried forward into releases beyond 7.x.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 91.204% when pulling 1ce7c93758e1d136b468af1415fb917280a8e288 on fix-add-virtual-resource into 3b3923f42ac8f94e4f8e486d70bac5a163cd88fa on master.

ndushay commented 4 years ago

My assistant in preparing this PR

IMG_4082