diff options
author | Marius Halden <marius.h@lden.org> | 2017-11-03 16:13:59 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2017-11-03 16:13:59 +0100 |
commit | 42d874db498d0fabae92d0c87acf99054d92391b (patch) | |
tree | d0cf5afdee3d244c4e5da6fe1ab9acba620634df /perllib/FixMyStreet/Cobrand/Angus.pm | |
parent | 19a7c5dda85a47a68040c742791e9cd9d3e52be6 (diff) | |
parent | dc7613329c275cd158fdde8faf1c0e301f5b7202 (diff) |
Merge tag 'v2.2' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Angus.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Angus.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Angus.pm b/perllib/FixMyStreet/Cobrand/Angus.pm index 0361c2d11..51a3da56a 100644 --- a/perllib/FixMyStreet/Cobrand/Angus.pm +++ b/perllib/FixMyStreet/Cobrand/Angus.pm @@ -4,7 +4,7 @@ use parent 'FixMyStreet::Cobrand::UKCouncils'; use strict; use warnings; -sub council_id { return 2550; } +sub council_area_id { return 2550; } sub council_area { return 'Angus'; } sub council_name { return 'Angus Council'; } sub council_url { return 'angus'; } @@ -70,13 +70,17 @@ sub temp_update_contacts { my $contact_rs = $self->{c}->model('DB::Contact'); + my $body = FixMyStreet::DB->resultset('Body')->search({ + 'body_areas.area_id' => $self->council_area_id, + }, { join => 'body_areas' })->first; + my $_update = sub { my ($category, $field, $category_details) = @_; # NB: we're accepting just 1 field, but supply as array [ $field ] my $contact = $contact_rs->find_or_create( { - body_id => $self->council_id, + body => $body, category => $category, %{ $category_details || {} }, }, |