samvera / active_fedora

A Rails interface to the Fedora repository, akin to ActiveModel
Other
54 stars 63 forks source link

reload on object copy results in uncaught error #1388

Closed lsat12357 closed 3 years ago

lsat12357 commented 5 years ago

When two copies of an object are live and one is destroyed and reload is called with the other, an uncaught Ldp::Gone error is raised as the destroyed flag has not been set on the other copy. The expected behavior when reload is called on a destroyed object is to raise an ActiveFedora::ObjectNotFoundError. This scenario can occur in Hyrax when the wings module is used; in the persister delete method, a copy of the object is destroyed, and the destroyed flag is not set on the active copy.