diff options
-rwxr-xr-x | web/reports.cgi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/reports.cgi b/web/reports.cgi index bc418db7c..4faee63f9 100755 --- a/web/reports.cgi +++ b/web/reports.cgi @@ -67,6 +67,10 @@ sub main { } } elsif ($q_council =~ /^\d+$/) { my $va_info = mySociety::MaPit::call('area', $q_council); + if ($va_info->{error}) { + print $q->redirect($base_url . '/reports'); + return; + } $area_name = $va_info->{name}; print $q->redirect($base_url . '/reports/' . Page::short_name($area_name)); return; |