Skip to content
New issue

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

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

Already on GitHub? # to your account

Unclear error message when attempting to add a collection to a work #259

Closed
elrayle opened this issue Dec 18, 2015 · 1 comment
Closed
Assignees

Comments

@elrayle
Copy link
Contributor

elrayle commented Dec 18, 2015

To reproduce...

col = Hydra::Works::Collection.new(id: 'col-1')
wrk = Hydra::Works::Work.new(id: 'w-1')

wrk.members << col
=> ActiveFedora::AssociationTypeMismatch: #<Collection:0x007fc234ef9950> is not a PCDM object.

Although a work can have works and file sets as members and both are PCDM objects, it is not the case that all PCDM objects are works and file sets. It would be more precise for this message to read...

wrk.members << col
=> ActiveFedora::AssociationTypeMismatch: #<Collection:0x007fc234ef9950> is not a Hydra::Works work or fileset.
@mjgiarlo
Copy link
Member

I'll take a look at this soonish.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants