Improve find_bibliographic_id in NCIP::ILS.
authorJason Stephenson <jason@sigio.com>
Mon, 22 Sep 2014 14:45:27 +0000 (10:45 -0400)
committerJason Stephenson <jason@sigio.com>
Mon, 22 Sep 2014 14:45:27 +0000 (10:45 -0400)
Add a check for BibligraphicDescription under ItemOptionalFields.

Signed-off-by: Jason Stephenson <jason@sigio.com>
lib/NCIP/ILS.pm

index f8d917a..7be8ef7 100644 (file)
@@ -415,7 +415,9 @@ sub find_bibliographic_id {
 
     # Find the BibliographicId in the xml.
     my $idxml;
-    if ($request->{$message}->{BibliographicDescription}) {
+    if ($request->{$message}->{ItemOptionalFields}->{BibligraphicDescription}) {
+        $idxml = $request->{$message}->{ItemOptionalFields}->{BibligraphicDescription}->{BibliographicId};
+    } elsif ($request->{$message}->{BibliographicDescription}) {
         $idxml = $request->{$message}->{BibliographicDescription}->{BibliograhicId};
     } else {
         $idxml = $request->{$message}->{BibliographicId};