From: Jason Stephenson Date: Mon, 13 Apr 2015 11:42:48 +0000 (-0400) Subject: A little more defensive programming in NCIP::ILS::Evergreen. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=af02cfa68c4071b81d12fa45743849552a83ee55;p=working%2FNCIPServer.git A little more defensive programming in NCIP::ILS::Evergreen. 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 --- diff --git a/lib/NCIP/ILS/Evergreen.pm b/lib/NCIP/ILS/Evergreen.pm index d1c957b..1de6737 100644 --- a/lib/NCIP/ILS/Evergreen.pm +++ b/lib/NCIP/ILS/Evergreen.pm @@ -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);