From a7bd8b86f61575420c5a390d376fc4b64e8f1e15 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 25 Feb 2020 13:44:35 -0500 Subject: [PATCH] acq search: allow searching on an explicit null value This adjusts the special logic introduced in LP#1031535 so that explicitly searching with a field set to not null (e.g., when using the Angular grid 'exists' filter) will work. Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm index 2f5b94b96b..cd7e852c7e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm @@ -423,7 +423,7 @@ sub prepare_terms { } elsif ($gt or $lt) { my $op = $gt ? '>' : '<'; $v = {$op => $v}; - } elsif (not ref $v and $not) { + } elsif (not ref $v and $not and defined($v)) { # the old way, NOT (blah.id = $v) needs to be # (blah.id <> $x OR blah.id IS NULL) $not = 0; # avoid the regular negative transformation -- 2.11.0