From 8a66cf91af67abed82a9ec26968f490bfd62b37b Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 23 Aug 2019 09:22:21 +0100 Subject: [PATCH] typo fix in free ports --- lib/App/Netdisco/DB/ResultSet/DevicePort.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App/Netdisco/DB/ResultSet/DevicePort.pm b/lib/App/Netdisco/DB/ResultSet/DevicePort.pm index 5f16c99d..636ef569 100644 --- a/lib/App/Netdisco/DB/ResultSet/DevicePort.pm +++ b/lib/App/Netdisco/DB/ResultSet/DevicePort.pm @@ -67,7 +67,7 @@ sub with_is_free { ->search({}, { '+columns' => { is_free => - \["me.up = ' up' AND me.up != 'up' AND me.type != 'propVirtual' AND " + \["me.up_admin = 'up' AND me.up != 'up' AND me.type != 'propVirtual' AND " ."((age(now(), to_timestamp(extract(epoch from device.last_discover) - (device.uptime/100))) < ?::interval " ."AND (last_node.time_last IS NULL OR age(now(), last_node.time_last) > ?::interval)) " ."OR age(now(), to_timestamp(extract(epoch from device.last_discover) - (device.uptime - me.lastchange)/100)) > ?::interval)",