From 9ba717af27b1f2dec96b1e9df497bc14be645082 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 5 Mar 2024 17:07:01 +0000 Subject: [PATCH] Bug 36197: Only check limits for regular requests Skip for unauthenticated requests Signed-off-by: David Nind --- Koha/ILL/Request.pm | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm index 4df167d15f..063c3a0f10 100644 --- a/Koha/ILL/Request.pm +++ b/Koha/ILL/Request.pm @@ -1027,18 +1027,14 @@ sub backend_create { # ... complex case: commit! # Do we still have space for an ILL or should we queue? - my $permitted = $self->check_limits( - { patron => $self->patron }, { librarycode => $self->branchcode } - ); - - # Now augment our committed request. - - $result->{permitted} = $permitted; # Queue request? - - # This involves... - - # ...Updating status! - $self->status('QUEUED')->store unless ( $permitted ); + my $permitted = 1; + if( $self->patron ) { + $permitted = $self->check_limits( + { patron => $self->patron }, { librarycode => $self->branchcode } + ); + $result->{permitted} = $permitted; + $self->status('QUEUED')->store unless ($permitted); + } ## Handle Unmediated ILLs -- 2.39.2