From 7f4a0e942f5a7803b5b9076167466d3e2300ae3d Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 5 Apr 2024 14:03:05 +0200 Subject: [PATCH] Bug 35959: Fix C3 merge of Koha::Old::Hold Test plan: Run `perl -c Koha/Old/Hold.pm` It should print 'syntax OK' --- C4/Reserves.pm | 2 +- Koha/Hold.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index c95a3d7ad4..c86118c7cc 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -44,7 +44,6 @@ use Koha::Holds; use Koha::ItemTypes; use Koha::Items; use Koha::Libraries; -use Koha::Old::Holds; use Koha::Patrons; use Koha::Plugins; use Koha::Policy::Holds; @@ -1637,6 +1636,7 @@ sub _FixPriority { $hold = Koha::Holds->find( $reserve_id ); if (!defined $hold){ # may have already been checked out and hold fulfilled + require Koha::Old::Holds; $hold = Koha::Old::Holds->find( $reserve_id ); } return unless $hold; diff --git a/Koha/Hold.pm b/Koha/Hold.pm index a74ed95b58..6bcf8cb643 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -34,7 +34,6 @@ use Koha::Biblios; use Koha::Hold::CancellationRequests; use Koha::Items; use Koha::Libraries; -use Koha::Old::Holds; use Koha::Calendar; use Koha::Plugins; @@ -987,6 +986,7 @@ Move a hold to the old_reserve table following the same pattern as Koha::Patron- sub _move_to_old { my ($self) = @_; my $hold_infos = $self->unblessed; + require Koha::Old::Hold; return Koha::Old::Hold->new( $hold_infos )->store; } -- 2.30.2