-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Steps to reproduce the problem:
- In the rails console, create an
Etd
record with committee chairs and members:
cm_attrs = [
{ name: ['Frodo'], affiliation: ['Emory University'] },
{ name: ['Bilbo'], affiliation: ['University of Bilbo'] }
]
cc_attrs = [
{ name: ['Gandalf'], affiliation: ['Emory University'] }
]
etd = Etd.new(title: ['ETD 1'], committee_members_attributes: cm_attrs, committee_chair_attributes: cc_attrs)
etd.save!
-
Look at the
Etd
record in the fedora console. -
Notice that the committee chair is correctly listed in the
ths
predicate, and the committee members are correctly listed in therev
predicate. -
Scroll to the bottom of the page to the 'Other Resources' section, and notice 3 nested records (1 for the chair and 2 for the members).
-
So far, everything is correct in fedora.
-
Now go back to the rails console and delete the 2 committee members:
etd.committee_members = nil
etd.save!
-
Go back to the fedora console, and reload the page.
-
Notice that the
rev
predicate has disappeared from the record (as expected). -
But down in the 'Other Resources' section, you still see 3 child resources, even though you would expect to see only 1.
Expected Result:
The 2 child resources should have been removed from the work's record in fedora.
Actual Result:
The 2 (orphaned) child resources still exist in fedora.