From 3d27184b1c648335f46df4cce198bb1c58197f84 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 8 May 2018 22:33:31 +0100 Subject: [PATCH] #414 clicking discover button with empty field causes crash --- Changes | 4 ++++ lib/App/Netdisco/Web/AdminTask.pm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ddc87c38..abb81426 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,10 @@ * #410 improvements to Undiscovered Neighbors report * device port search will match on Description as well as Port + [BUG FIXES] + + * #414 clicking discover button with empty field causes crash + 2.039028 - 2018-05-05 [BUG FIXES] diff --git a/lib/App/Netdisco/Web/AdminTask.pm b/lib/App/Netdisco/Web/AdminTask.pm index 944a5f48..7826a6f4 100644 --- a/lib/App/Netdisco/Web/AdminTask.pm +++ b/lib/App/Netdisco/Web/AdminTask.pm @@ -16,7 +16,7 @@ sub add_job { return if ($device and (!$net or $net->num == 0 or $net->addr eq '0.0.0.0')); - my @hostlist = defined $device ? ($net->hostenum) : (undef); + my @hostlist = $device ? ($net->hostenum) : (undef); jq_insert([map {{ ($_ ? (device => $_->addr) : ()),