hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

NoMethodError `errors` for <GenericWork> when adding work to two collections of same single membership type (nurax-pg)

Open elrayle opened this issue 3 years ago • 0 comments

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...

image

Steps to reproduce the behavior

On nurax-pg...

Prerequisite:

  1. Create a collection type that is single membership
  2. Create two collections of that type

To Reproduce:

  1. Dashboard -> Works -> Add new work -> select any work type
  2. Fill in required metadata
  3. Select tab: Relationships
  4. In Add to collection selection, type name of first single membership collection and click button: Add
  5. In Add to collection selection, type name of second single membership collection and click button: Add
  6. Click button: Save changes

See exception shown in Actual behavior.

Related work

Issue #5582

elrayle avatar Apr 04 '22 21:04 elrayle