From: Bill Erickson Date: Tue, 15 May 2012 14:11:37 +0000 (-0400) Subject: TPAC added content data retrieval sanity check X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=551b0ab65ce8f34db142f72ccb7a4e0a42518dd1;p=evergreen%2Fpines.git TPAC added content data retrieval sanity check On the backend, avoid fetching added content data when initial request returns 404. This prevents edge case where a specific type may be selected (e.g. via bookmark) even though no data exists for the type. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm index f7d09f6eaa..0a3935b92f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -472,7 +472,7 @@ sub added_content_stage2 { $content->{status} = $code eq '200' ? 1 : 2; $logger->debug("tpac: added content request for $type returned $code"); - if ($type eq $sel_type) { + if ($code eq '200' and $type eq $sel_type) { while (1) { my $buf; my $n = $req->read_entity_body($buf, 1024);