diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ModuleInventory.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ModuleInventory.pm index e37c2a6a..c31ee518 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ModuleInventory.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ModuleInventory.pm @@ -88,7 +88,7 @@ get '/ajax/content/report/moduleinventory' => require_login sub { } else { @results = $rs->search( - {}, + {class => { '!=', undef }}, { select => [ 'class', { count => 'class' } ], as => [qw/ class count /], group_by => [qw/ class /] diff --git a/Netdisco/share/views/ajax/report/moduleinventory.tt b/Netdisco/share/views/ajax/report/moduleinventory.tt index 333b0044..a5453ff3 100644 --- a/Netdisco/share/views/ajax/report/moduleinventory.tt +++ b/Netdisco/share/views/ajax/report/moduleinventory.tt @@ -65,7 +65,7 @@ $(document).ready(function() { }, { "data": 'class', "render": function(data, type, row, meta) { - return '' + he.encode(capitalizeFirstLetter(data)) + ''; + return '' + he.encode(capitalizeFirstLetter(data + '')) + ''; } }, { "data": 'type', @@ -101,7 +101,7 @@ $(document).ready(function() { [% ELSE %] { "data": 'class', "render": function(data, type, row, meta) { - return '' + he.encode(capitalizeFirstLetter(data)) + ''; + return '' + he.encode(capitalizeFirstLetter(data + '')) + ''; } }, { "data": 'count',