Make users_of_interest test for defined actor.usr.card values
authorMichael Peters <mpeters@emeralddata.net>
Thu, 20 Nov 2014 22:41:44 +0000 (17:41 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 19 Nov 2022 19:49:20 +0000 (14:49 -0500)
commit372b007c95d2fdcd7b31b0d2dbedf0779762537b
tree436489950c75b40d6d0b101c2d77135434453609
parent0ae85b74d069873b97ca7edd21ecb1c540066d8d
Make users_of_interest test for defined actor.usr.card values

If the open-ils.collections.users_of_interest API encounters a patron that
has a null "card" value in actor.usr the API will crash with an error like:

Received Exception:
Name: osrfMethodException
Status:  *** Call to [open-ils.collections.users_of_interest.retrieve] failed for session [1416515351.333446.1416515351406], thread trace [1]:
Can't call method "barcode" on an undefined value at /usr/local/share/perl/5.14.2/OpenILS/Application/Collections.pm line 299.

This patches users_of_interest to be sure that the user has a defined value
for actor.usr.card before proceeding to pull out the barcode for the results
of the API call.

Signed-off-by: Michael Peters <mpeters@emeralddata.net>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm