From 99f75b94788325203e88751312fa6fc36aed0f4d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 20 Feb 2015 07:23:15 -0500 Subject: [PATCH] Bug 12858 [QA Followup] - Don't call webservice if we have no data Signed-off-by: Kyle M Hall Signed-off-by: Mason James (cherry picked from commit 4c8c1e1cd0b2894404d3147e1f480dcdb6def330) Signed-off-by: Fridolin Somers --- C4/External/Syndetics.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/External/Syndetics.pm b/C4/External/Syndetics.pm index 2d14674caa..50f1e64920 100644 --- a/C4/External/Syndetics.pm +++ b/C4/External/Syndetics.pm @@ -63,7 +63,9 @@ Get Summary data from Syndetics =cut sub get_syndetics_index { - my ( $isbn,$upc,$oclc ) = @_; + my ( $isbn, $upc, $oclc ) = @_; + + return unless ( $isbn || $upc || $oclc ); my $response = _fetch_syndetics_content('INDEX.XML', $isbn, $upc, $oclc); unless ($response->content_type =~ /xml/) { @@ -80,9 +82,9 @@ sub get_syndetics_index { for my $available_type ('SUMMARY','TOC','FICTION','AWARDS1','SERIES1','SPSUMMARY','SPREVIEW', 'AVPROFILE', 'AVSUMMARY','DBCHAPTER','LJREVIEW','PWREVIEW','SLJREVIEW','CHREVIEW','BLREVIEW','HBREVIEW','KIREVIEW','CRITICASREVIEW','ANOTES') { if (exists $response->{$available_type} && $response->{$available_type} =~ /$available_type/) { $syndetics_elements->{$available_type} = $available_type; - #warn "RESPONSE: $available_type : $response->{$available_type}"; } } + return $syndetics_elements if $syndetics_elements; } -- 2.39.5