Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method :new_record? when loading new form for Monograph #5447

Closed
elrayle opened this issue Feb 18, 2022 · 0 comments · Fixed by #5516 or #5535
Closed

undefined method :new_record? when loading new form for Monograph #5447

elrayle opened this issue Feb 18, 2022 · 0 comments · Fixed by #5516 or #5535
Labels
batch edit Effort: Minor valkyrization Work impacts the Work part of PCDM Model

Comments

@elrayle
Copy link
Contributor

elrayle commented Feb 18, 2022

See Issue #5462 which has the same underlying failure.

Descriptive summary

When attempting to create a new Monograph work, which is a Valkyrie::Resource, exception undefined method :new_record? occurs as the new form loads.

Rationale

Creating a new record is core functionality and should be error free for Valkyrie works.

Expected behavior

Dashboard -> Works -> Add new work -> select type: Monograph -> Create work, should load the new work form.

Actual behavior

Dashboard -> Works -> Add new work -> select type: Monograph -> Create work, raises an exception:

image

NOTE: The problem is that Valkyrie works do not respond to :new_record?. They do respond to :persisted? which will be false when it is a new work.

Steps to reproduce the behavior

Prerequisite:

  1. Navigate to: Dashboard -> Settings -> Features
  2. make sure Batch upload is ON

To reproduce:

  1. Navigate to: Dashboard -> Works
  2. click button: Add new work
  3. select type: Monograph
  4. click button: Create work

Raises the exception seen under Actual behavior section

@elrayle elrayle changed the title undefined method new_record? when loading new form for Monograph undefined method new_record? when loading new form for Monograph Feb 18, 2022
@elrayle elrayle changed the title undefined method new_record? when loading new form for Monograph undefined method :new_record? when loading new form for Monograph Feb 18, 2022
@elrayle elrayle added the Work impacts the Work part of PCDM Model label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
batch edit Effort: Minor valkyrization Work impacts the Work part of PCDM Model
Projects
None yet
1 participant