A little more defensive programming in NCIP::ILS::Evergreen.
authorJason Stephenson <jason@sigio.com>
Mon, 13 Apr 2015 11:42:48 +0000 (07:42 -0400)
committerJason Stephenson <jason@sigio.com>
Mon, 13 Apr 2015 11:42:48 +0000 (07:42 -0400)
If for some reason actor.usr.card does not have the id of a valid
barcode and we get nothing from it, we use the barcode that we
were given in the LookupUser request.

Signed-off-by: Jason Stephenson <jason@sigio.com>

lib/NCIP/ILS/Evergreen.pm

index d1c957b..1de6737 100644 (file)
@@ -166,7 +166,7 @@ sub lookupuser {
     # Use the user's main card as the UserId.
     my $id = NCIP::User::Id->new({
         UserIdentifierType => 'Barcode',
-        UserIdnetifierValue => $user->card->barcode()
+        UserIdnetifierValue => $user->card->barcode() || $barcode
     });
     $userdata->UserId($id);