Bug 19487: Refetch the object to get up-to-date values

This has been raised by failures on t/db_dependent/Circulation/issue.t
(thanks tests!)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 850243ee2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2017-10-20 15:56:20 -03:00 committed by Fridolin Somers
parent 49beda2176
commit 9d3b39e94d
1 changed files with 3 additions and 0 deletions

View File

@ -2174,6 +2174,9 @@ sub MarkIssueReturned {
# Update the returndate
$dbh->do( $query, undef, @bind );
# We just updated the returndate, so we need to refetch $issue
$issue->discard_changes;
# Create the old_issues entry
my $old_checkout = Koha::Old::Checkout->new($issue->unblessed)->store;