From e758a78c1810a87ad490e3f0293434b69c57dd84 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 10 Mar 2023 18:04:37 +0000 Subject: [PATCH] fix error with unused reports menu categories --- lib/App/Netdisco/Web.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/App/Netdisco/Web.pm b/lib/App/Netdisco/Web.pm index 4af59e44..75158bfc 100644 --- a/lib/App/Netdisco/Web.pm +++ b/lib/App/Netdisco/Web.pm @@ -143,6 +143,7 @@ push @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} }, # sort the reports which have been loaded, by their label foreach my $cat (@{ setting('_report_order') }) { + setting('_reports_menu')->{ $cat } ||= []; setting('_reports_menu')->{ $cat } = [ sort { setting('_reports')->{$a}->{'label'} cmp