From 614ac24912397b898f28b1a2b607596a9a1aea13 Mon Sep 17 00:00:00 2001 From: Jakub Skokan Date: Wed, 21 Oct 2020 20:56:34 +0200 Subject: [PATCH] api: fix host IP address filter by location --- api/lib/vpsadmin/api/resources/host_ip_address.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/lib/vpsadmin/api/resources/host_ip_address.rb b/api/lib/vpsadmin/api/resources/host_ip_address.rb index ef44ba11d..67dbdce0a 100644 --- a/api/lib/vpsadmin/api/resources/host_ip_address.rb +++ b/api/lib/vpsadmin/api/resources/host_ip_address.rb @@ -78,7 +78,7 @@ def query if input[:location] locs = ::LocationNetwork.where(location: input[:location]).pluck(:network_id) - ips = ips.where(networks: {id: locs.id}) + ips = ips.where(networks: {id: locs}) end if input.has_key?(:vps)