MT#60378 accept null same way as NULL for search

* search by value null is internally translated to undef
  to say search for records without a value, same way as
  it already works for NULL value, just null is more expected
  and easier to use by clients as it's how its represented in the
  resource

Change-Id: Ia8a75bad95a34dd8167162d0f09a1ec7c4056105
mr13.0
Kirill Solomko 2 years ago
parent 6543743992
commit 18597efb87

@ -1109,7 +1109,7 @@ sub apply_query_params {
my $p = $param;
$p = $p->{param} if ref $p;
my $q = $c->req->query_params->{$p};
$q = undef if $q eq "NULL"; # IS NULL translation
$q = undef if $q && !is_int($q) && ($q eq "NULL" or $q eq "null"); # IS NULL translation
next unless ref $param; # skip unknown query parameters
next unless($param->{query} || $param->{query_type} || $param->{new_rs}); # skip dummy query parameters
if (defined $param->{new_rs}) {

Loading…
Cancel
Save