From e03533c8eb4c068cdef0d9c1eb99cccdc1253de3 Mon Sep 17 00:00:00 2001 From: Flaviu Mates Date: Mon, 16 Nov 2020 16:48:35 +0200 Subject: [PATCH] TT#101100 Fix /api/pbxdevices 500 error introduced with TT#96803 * Filtering by subscriber properties introduced a join which confused the use of 'profile_id' for devices Change-Id: I5e8fbdc0a83076b95183dbdb757921c8112e9e00 --- lib/NGCP/Panel/Controller/API/PbxDevices.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/API/PbxDevices.pm b/lib/NGCP/Panel/Controller/API/PbxDevices.pm index 34af2e4d9a..1c644ec7d0 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevices.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevices.pm @@ -35,7 +35,12 @@ sub query_params { { param => 'profile_id', description => 'Search for PBX devices with a specific autoprovisioning device profile', - query_type => 'string_eq', + query => { + first => sub { + my $q = shift; + { 'me.profile_id' => $q }; + } + } }, { param => 'identifier',