From 1bdfb9110d16ad9e4d655af8ba3af85ed20e46b4 Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 14 Jul 2010 12:07:19 +0000 Subject: [PATCH] validate.tag.id_list: Return an empty list instead of 0 in the case of no matching records This makes it a little easier to handle cases where there was no match, rather than having to check to see if we have a scalar or a reference to a list. git-svn-id: svn://svn.open-ils.org/ILS/trunk@16927 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm index eab9c51f07..3f5127c63c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm @@ -60,7 +60,7 @@ sub validate_tag { if ($self->api_name =~ /id_list/) { my $id_list = authority::full_rec->db_Main->selectcol_arrayref( $sql, {}, @values, $t, scalar(@searches) ); - return $id_list if (scalar(@$id_list)> 0); + return $id_list; } else { my $count = authority::full_rec->db_Main->selectcol_arrayref( $sql, {}, @values, $t, scalar(@searches) )->[0]; return $count if ($count > 0); -- 2.11.0