From 3ba4006c73cfdcd7f75adc2ee58fe5c1fe561a0d Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 9 Feb 2012 11:29:16 +0000 Subject: [PATCH] update Device.pm to use new helper naming --- Netdisco/lib/Netdisco/Web/Device.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Netdisco/lib/Netdisco/Web/Device.pm b/Netdisco/lib/Netdisco/Web/Device.pm index b736fd0b..86b2c210 100644 --- a/Netdisco/lib/Netdisco/Web/Device.pm +++ b/Netdisco/lib/Netdisco/Web/Device.pm @@ -71,7 +71,7 @@ ajax '/ajax/content/device/ports' => sub { my $ip = param('q'); return unless $ip; - my $set = schema('netdisco')->resultset('DevicePort')->by_ip($ip); + my $set = schema('netdisco')->resultset('DevicePort')->search_by_ip({ip => $ip}); # refine by ports if requested my $q = param('f'); @@ -80,12 +80,13 @@ ajax '/ajax/content/device/ports' => sub { $set = $set->by_vlan($q); } else { - my $c = schema('netdisco')->resultset('DevicePort')->by_ip($ip)->by_port($q); + my $c = schema('netdisco')->resultset('DevicePort') + ->search_by_ip({ip => $ip})->search_by_port({port => $q}); if ($c->count) { - $set = $set->by_port($q); + $set = $set->search_by_port({port => $q}); } else { - $set = $set->by_name($q); + $set = $set->search_by_name({name => $q}); } } }