From 72b38a1dbfe12685124b9814dc97807e0d301d3f Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 19 Sep 2024 14:00:41 +0000 Subject: [PATCH] Bug 37856: Consider absence of 'Report_Items' The SUSHI provider in question for this patchset also does not return any Report_Items entry. This patch accounts for that. Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- Koha/ERM/EUsage/UsageDataProvider.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/ERM/EUsage/UsageDataProvider.pm b/Koha/ERM/EUsage/UsageDataProvider.pm index b9ead5ca86..1f094e15d3 100644 --- a/Koha/ERM/EUsage/UsageDataProvider.pm +++ b/Koha/ERM/EUsage/UsageDataProvider.pm @@ -488,7 +488,7 @@ sub _sushi_errors { return 1; } - if ( scalar @{ $decoded_response->{Report_Items} } == 0 ) { + if ( $decoded_response->{Report_Items} && scalar @{ $decoded_response->{Report_Items} } == 0 ) { $self->{job_callbacks}->{add_message_callback}->( { type => 'error', -- 2.39.5