hyrax
hyrax copied to clipboard
Works cannot be saved if embargo or lease is assigned (nurax-pg)
Descriptive summary
Using Hyrax 3.3/Nurax-pg, a user cannot save a new work or save changes to an existing work if an embargo has been assigned.
Rationale
Users should be able to assign embargoes if they are enabled for a given Admin Set.
Expected behavior
If a user can select embargo options, they can then populate them and save their changes to the work.
Actual behavior
When an embargo is assigned to a work, clicking Save returns the following error:
Failed save on # undefined method `[]' for nil:NilClass
Steps to reproduce the behavior
- Create a new work or edit an existing work in an Admin Set that allows embargoes/leases (e.g. Default Admin Set)
- Select any permitted embargo or lease option (e.g. Embargo > Restricted to Private until 3/30/2023; then open to Public)
- Make sure all Requirements show green checks under Save Work
- Click Save Changes
- See error message in banner above the work form
Related work
Prior work: #5460