[open-ils-commits] r19606 - trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 7 11:03:05 EST 2011
Author: miker
Date: 2011-03-07 11:03:02 -0500 (Mon, 07 Mar 2011)
New Revision: 19606
Modified:
trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Log:
Only generate ORed filters if there are some to use
Modified: trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm 2011-03-07 16:03:00 UTC (rev 19605)
+++ trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm 2011-03-07 16:03:02 UTC (rev 19606)
@@ -532,7 +532,8 @@
$combined_dyn_filters .= 'AND mrd.attrs @> (' . join(' || ', @{$dyn_filters{''}}) . ') ' if (@{$dyn_filters{''}});
delete($dyn_filters{''});
- $combined_dyn_filters .= 'AND ' . join(' AND ', values(%dyn_filters));
+ my @dyn_filter_list = values(%dyn_filters);
+ $combined_dyn_filters .= 'AND ' . join(' AND ', @dyn_filter_list) if (@dyn_filter_list);
my $rank = $rel;
More information about the open-ils-commits
mailing list