hyrax
hyrax copied to clipboard
NoMethodError `errors` for <GenericWork> when adding work to two collections of same single membership type (nurax-pg)
Descriptive summary
Adding a work to two collections of the same single membership type raises NoMethodError - undefined method 'errors' for <GenericWork>
Expected behavior
When attempting to add a work to a second collection of the same single membership type, after clicking Save, should stay in the editor and see flash message explaining why this is not allowed.
Actual behavior
When attempting to add a work to a second collection of the same single membership type, after clicking Save, it attempts to stay in the editor but raises an exception...
Steps to reproduce the behavior
On nurax-pg...
Prerequisite:
- Create a collection type that is single membership
- Create two collections of that type
To Reproduce:
- Dashboard -> Works -> Add new work -> select any work type
- Fill in required metadata
- Select tab: Relationships
- In Add to collection selection, type name of first single membership collection and click button: Add
- In Add to collection selection, type name of second single membership collection and click button: Add
- Click button: Save changes
See exception shown in Actual behavior.
Related work
Issue #5582