From 828c44cebd7a0a119183bcdb856c235bca90ceba Mon Sep 17 00:00:00 2001 From: phasefx Date: Sun, 21 Sep 2008 02:12:04 +0000 Subject: [PATCH] Make this method return 1 and 0 like the description says. Currently the staff client can't distinguish legitimate null returns from network errors git-svn-id: svn://svn.open-ils.org/ILS/trunk@10660 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 5e17c0fd90..7a7c2191d5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -2602,8 +2602,13 @@ sub barcode_exists { my $e = new_editor(authtoken=>$auth); return $e->event unless $e->checkauth; my $card = $e->search_actor_card({barcode => $barcode}); - return undef unless @$card; - return $card->[0]->usr; + if (@$card) { + return 1; + } else { + return 0; + } + #return undef unless @$card; + #return $card->[0]->usr; } -- 2.43.2