Deleting digital object link from record in UI breaks digital object link for other records
|Assignee:||Nick Wilkinson||% Done:|
|Target version:||Release 2.5.0|
|Google Code Legacy ID:||Tested version:||2.3, 2.4|
This is an edge case (and really shouldn't happen in the real world outside of testing since our app isn't designed for it...), so marking this as low priority, but it'd still be nice to resolve for testing purposes (it'd be cumbersome to need to use diff digital objects every single test record).
1. Create 2 records
2. Link the same digital object to both records
3. Delete the digital object link from record A
Result: Digital object no longer displays in record B either; both records were linking to the same digital object on the file system (based on checksum). Step 3 above deletes the digital object from the file system, so when you visit record B it points to a no longer existing file and so the digital object is broken there.
Expected result: During digital object link delete confirmation screen in UI, the code should query the digital_object table and check if the digital object's file path is used in any other entries in the table--if so do not delete the digital object from the file system.