hyrax: NoMethodError `errors` for 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…

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

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (16 by maintainers)

Commits related to this issue

Most upvoted comments

@alishaevn I certainly appreciate your persistence–thank you!

@rjkati This ticket is now closeable. Issue resolved for pg-nurax:

Yay!

@alishaevn Hi again!

Here’s the results from 4 different environments.

dev-nurax (works)

  • QA Testing for Hyrax
  • Hyrax Version: 4.0.0
  • Hyrax Branch: refs/heads/main
  • Hyrax Revision: 8aa6379a690945148dbb44e518a0037d370a35e1

dev-nurax

pg-nurax (fails)

  • QA Testing for Hyrax
  • Hyrax Version: 4.0.0
  • Hyrax Branch: refs/heads/main
  • Hyrax Revision: 014fe61dcb0a92f83bbe0b1b2c0828147ec4b4f8

pg-nurax

Local Hyrax (works)

hyrax4 0

Local Koppie (works)

koppie4 0

@alishaevn

This is the behavior I’m seeing on nurax-pg Hyrax Version: 4.0.0

pgNurax1