From: Galen Charlton Date: Tue, 25 Feb 2020 18:44:35 +0000 (-0500) Subject: acq search: allow searching on an explicit null value X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a7bd8b86f61575420c5a390d376fc4b64e8f1e15;p=working%2FEvergreen.git 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 --- 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