sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

Allow file use and language tag attrs to be removed #644

Closed mjgiarlo closed 10 months ago

mjgiarlo commented 10 months ago

Why was this change made?

Prior to this commit, it was not possible to create a new instance of a File model containing use or language tag attrs with either or both removed (replaced by nils). See https://github.com/sul-dlss/argo/blob/main/app/services/structure_updater.rb#L92, which prevents users from removing file use values.

This commit makes it possible to do so.

Because this makes our models slightly more permissive, I don't think running a validation in a deployed env is worth the time/cost.

How was this change tested?

CI, bundle console

ndushay commented 10 months ago

is this anything andrew or arcadia would care about? (I doubt it?)

mjgiarlo commented 10 months ago

@ndushay 💬

is this anything andrew or arcadia would care about? (I doubt it?)

Andrew wants to be able to unset file use and language attrs and currently can't. This change only affects structural metadata, not descriptive.