samvera / active_fedora

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

core reload rescue edge case #1389

Closed lsat12357 closed 3 years ago

lsat12357 commented 5 years ago

Fixes #1388 This adds a rescue block to the reload method in core; it handles the case where two copies of an object are live, one is destroyed, but reload is called the other which will not have the destroyed flag set, resulting in uncaught Ldp::Gone, rather than the expected ActiveFedora::ObjectNotFoundError. This scenario can occur in Hyrax when the wings module is in use; a monkey patch by @no-reply to temporarily handle this in Hyrax is in progress.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.003%) to 89.48% when pulling bcee3eb9a4f57fd06eaaadfa31f87bd858f282b1 on rescue_ldp_error_on_reload into 864f3d2dc612acec024b24ada166d0ba7d8a6979 on master.