[open-ils-commits] r16927 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 14 08:07:20 EDT 2010
Author: dbs
Date: 2010-07-14 08:07:19 -0400 (Wed, 14 Jul 2010)
New Revision: 16927
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm
Log:
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.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm 2010-07-14 09:50:16 UTC (rev 16926)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm 2010-07-14 12:07:19 UTC (rev 16927)
@@ -60,7 +60,7 @@
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);
More information about the open-ils-commits
mailing list