LP#1996938: Make users_of_interest test for defined actor.usr.card values user/csharp/lp1996938_fix_users_of_interest_api
authorMichael Peters <mpeters@emeralddata.net>
Thu, 20 Nov 2014 22:41:44 +0000 (17:41 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Thu, 17 Nov 2022 19:34:29 +0000 (19:34 +0000)
commitd5c964c28e6ac0a4743892878b0dfe313d85ec95
treef50f93e5109aa66f62d28a8b473133f5c7086691
parent4c1ceb3896b4d76a58be2ae3da57c1a4fa46f878
LP#1996938: 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
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm