We need to retrieve the copy again after a successful checkin because
its status and other details have changed.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
$result = $result->[0];
}
if ($result->{textcode} eq 'SUCCESS') {
+ # We need to retrieve the copy again because its status may
+ # have changed, and it could have been in a state that won't
+ # let us delete it before the checkin.
+ $details = $self->retrieve_copy_details_by_barcode($copy->barcode());
+ $copy = $details->{copy};
+
# Delete the copy. Since delete_copy checks ownership
# before attempting to delete the copy, we don't bother
# checking who owns it.