#388 searching for 0.x.x.x returns Internal Server Error (C. Neuhaus)

This commit is contained in:
Oliver Gorwits
2018-04-10 21:22:06 +01:00
parent 6ee946cca6
commit 11e49671fd
2 changed files with 2 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ get '/search' => require_login sub {
my $nd = $s->resultset('Device')->search_fuzzy($q);
my ($likeval, $likeclause) = sql_match($q);
my $mac = NetAddr::MAC->new($q);
undef $mac if ($mac and $mac->as_ieee and ($mac->as_ieee eq '00:00:00:00'));
if ($nd and $nd->count) {
if ($nd->count == 1) {