Comment 1 for bug 1318029

Revision history for this message
Bill Erickson (berick) wrote :

ContentCafe doesn't differentiate between ISBN and UPC at the API level, so falling back to passing UPC should when no ISBN exists should suffice. Untested, but I believe this would work:

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
index e1c0bf0..5ed3b8f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
@@ -173,7 +173,7 @@ sub handler {
             $data = $handler->$method($keyhash);
         } else {
             # Pass single ISBN as a scalar to the handler
- $data = $handler->$method($keyhash->{isbn}[0]);
+ $data = $handler->$method($keyhash->{isbn}[0] || $keyhash->{upc}[0]);
         }
     } catch Error with {
         $err = shift;