[NUUG fiksgatami] send-alert cron job complain with "No Area matches the given query." (Was: Service announced, and strange error from the send-alert cron job)

Matthew Somerville matthew at mysociety.org
Fri Apr 8 14:45:17 CEST 2011


On Fri, Apr 08, 2011 at 02:27:09PM +0200, Petter Reinholdtsen wrote:
> my $va_info = mySociety::MaPit::get_voting_area_info($row->{alert_parameter});

> 'alert_parameter' => '12',

> No Area matches the given query.#

alert_parameter is set to 12, and http://mapit.nuug.no/area/12.html
exists fine, hmm. <time passes> Okay, so get_voting_area_info (an
old-MaPit call) assumes a two digit number given to it is a UK ONS code
to be looked up, not a primary ID. :-/ I've switched it to use the new
MaPit area call, which doesn't have that edge case, so this should now
be fixed. Sorry about that.

ATB,
Matthew


More information about the fiksgatami mailing list