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

fix failure to forward to collection edit after create for PcdmCollection #5283

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

elrayle
Copy link
Contributor

@elrayle elrayle commented Dec 9, 2021

Description

When a collection is created with Hyrax.config.collection_model = 'Hyrax::PcdmCollection', the page does not forward to the collection edit page after saving the new collection.

Cause

The valkyrie_create method did not call after_create. The after_create method is what performed the forward to the edit page.

Solution

Update valkyrie_create to call after_create if saving is successful. The after_create method was also updated to perform some steps only when @collection.is_a? ActiveFedora::Base because those steps were already performed by valkyrie_create.

@samvera/hyrax-code-reviewers

@dlpierce dlpierce merged commit 85c8c7c into main Dec 10, 2021
@dlpierce dlpierce deleted the val_col_create_forward branch December 10, 2021 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants