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>
(cherry picked from commit 9d3b39e94d)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Jonathan Druart 2017-10-20 15:56:20 -03:00 committed by Katrin Fischer
parent 97d7d92234
commit 69312dd662
1 changed files with 3 additions and 0 deletions

View File

@ -2172,6 +2172,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::OldIssue->new($issue->unblessed)->store;