aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew>2007-10-19 20:48:51 +0000
committermatthew <matthew>2007-10-19 20:48:51 +0000
commita4e6d6ea3544da74dc358a551db87acaa084d602 (patch)
treef9972e26faadb6769dc21e07591ed1af51e08ff7
parent08e944260c1dece126d5294e29c2e103ccf536e3 (diff)
Deal with offshore half-postcodes.
-rwxr-xr-xweb/alert.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/alert.cgi b/web/alert.cgi
index 413dd4d1b..8fe5646ef 100755
--- a/web/alert.cgi
+++ b/web/alert.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: alert.cgi,v 1.21 2007-09-25 13:30:21 matthew Exp $
+# $Id: alert.cgi,v 1.22 2007-10-19 20:48:51 matthew Exp $
use strict;
use Standard;
@@ -76,6 +76,8 @@ sub alert_list {
my $areas = mySociety::MaPit::get_voting_areas_by_location({easting=>$e, northing=>$n}, 'polygon', \@types);
$areas = mySociety::MaPit::get_voting_areas_info([ keys %$areas ]);
+ return alert_front_page($q, 'That location does not appear to be covered by a council, perhaps it is offshore - please try somewhere more specific.') if keys %$areas == 0;
+
my ($options);
if (keys %$areas == 2) {