validate.tag.id_list: Return an empty list instead of 0 in the case of no matching...
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Jul 2010 12:07:19 +0000 (12:07 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Jul 2010 12:07:19 +0000 (12:07 +0000)
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

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm

index eab9c51..3f5127c 100644 (file)
@@ -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);