From 5aee0f6a2a06fedcfdabd34c1757a7a1455a6fcd Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 11 Feb 2022 10:32:04 +0000 Subject: [PATCH] Bug 26704: (follow-up) Rebase for bug 29785 Update newly introduced calls from '->messages' to '->object_messages' Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- C4/Circulation.pm | 2 +- t/db_dependent/Koha/Item.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index aded8a5b3b..17cab0c74b 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2128,7 +2128,7 @@ sub AddReturn { if ($item_was_lost) { $messages->{'WasLost'} = 1; unless ( C4::Context->preference("BlockReturnOfLostItems") ) { - my @object_messages = @{ $updated_item->messages }; + my @object_messages = @{ $updated_item->object_messages }; for my $message (@object_messages) { $messages->{'LostItemFeeRefunded'} = 1 if $message->message eq 'lost_refunded'; diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t index ac47d8fd48..0470a98c46 100755 --- a/t/db_dependent/Koha/Item.t +++ b/t/db_dependent/Koha/Item.t @@ -1199,7 +1199,7 @@ subtest 'store() tests' => sub { # simulate it was found $item->set( { itemlost => 0 } )->store; - my $messages = $item->messages; + my $messages = $item->object_messages; my $message_1 = $messages->[0]; -- 2.39.5