diff --git a/Netdisco/lib/App/Netdisco/DB/Result/Virtual/NodesDiscovered.pm b/Netdisco/lib/App/Netdisco/DB/Result/Virtual/NodesDiscovered.pm
index 1000c27d..1b8a39b4 100644
--- a/Netdisco/lib/App/Netdisco/DB/Result/Virtual/NodesDiscovered.pm
+++ b/Netdisco/lib/App/Netdisco/DB/Result/Virtual/NodesDiscovered.pm
@@ -33,8 +33,7 @@ WHERE d.ip = p.ip
WHERE a.alias = p.remote_ip
AND q.ip = a.ip
AND q.port = p.remote_port)
- AND p.remote_ip IS NOT NULL
- AND p.remote_port IS NOT NULL
+ AND (p.remote_id IS NOT NULL OR p.remote_type IS NOT NULL)
ENDSQL
);
diff --git a/Netdisco/share/views/ajax/report/nodesdiscovered.tt b/Netdisco/share/views/ajax/report/nodesdiscovered.tt
index 3826f539..f5a28098 100644
--- a/Netdisco/share/views/ajax/report/nodesdiscovered.tt
+++ b/Netdisco/share/views/ajax/report/nodesdiscovered.tt
@@ -33,7 +33,7 @@ $(document).ready(function() {
"type": 'portsort',
"render": function(data, type, row, meta) {
return type === 'display' ?
- '' + he.encode(data) + '' :
+ '' + he.encode(data) + '' :
data;
}
}, {
@@ -44,7 +44,7 @@ $(document).ready(function() {
}, {
"data": 'remote_ip',
"render": function(data, type, row, meta) {
- return '' + he.encode(data) + '';
+ return '' + he.encode(data || '') + '';
}
}, {
"data": 'remote_port',