diff options
Diffstat (limited to 'bin/update-areas')
-rwxr-xr-x | bin/update-areas | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/update-areas b/bin/update-areas index ed463708a..bbc933faf 100755 --- a/bin/update-areas +++ b/bin/update-areas @@ -33,11 +33,11 @@ BEGIN { } print "Fetching problems...\n"; -my $ids = select_all("select id, easting, northing from problem where areas=''"); +my $ids = select_all("select id, latitude, longitude from problem where areas=''"); print "Updating areas...\n"; my $c = 0; foreach (@$ids) { - my $areas = mySociety::MaPit::get_voting_areas_by_location({easting=>$_->{easting}, northing=>$_->{northing}}, 'polygon'); + my $areas = mySociety::MaPit::get_voting_areas_by_location({latitude=>$_->{latitude}, longitude=>$_->{longitude}}, 'polygon'); $areas = ',' . join(',', sort keys %$areas) . ','; dbh()->do('update problem set areas=? where id=?', {}, $areas, $_->{id}); dbh()->commit(); |