From db1b244937e3356ed9ee977f17d0b21ef85e4ebe Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Thu, 6 Oct 2022 10:47:38 +0200 Subject: [PATCH] MT#55538 /api/soundsets allow filtering by customer_id=null * when customer_id query param is specified as customer_id=null or customer_id=NULL it now correctly fetches soundsets that do not have customer_id assigned to them Change-Id: I8de3d9615c133c2abd3eb2b5f4fea8de5b652417 (cherry picked from commit a86e868a6f23fa49036000a0486af70e710696f2) --- lib/NGCP/Panel/Controller/API/SoundSets.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/API/SoundSets.pm b/lib/NGCP/Panel/Controller/API/SoundSets.pm index 493684ed36..d0a4cd9834 100644 --- a/lib/NGCP/Panel/Controller/API/SoundSets.pm +++ b/lib/NGCP/Panel/Controller/API/SoundSets.pm @@ -26,7 +26,7 @@ sub query_params { query => { first => sub { my $q = shift; - return { 'contract_id' => $q }; + return { 'contract_id' => lc($q) eq 'null' ? undef : $q }; }, second => sub {}, },