From: dbs Date: Wed, 14 Jul 2010 12:07:19 +0000 (+0000) Subject: validate.tag.id_list: Return an empty list instead of 0 in the case of no matching... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1bdfb9110d16ad9e4d655af8ba3af85ed20e46b4;p=evergreen%2Fbjwebb.git 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 --- 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 eab9c51f0..3f5127c63 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);