aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/SendReport/Barnet.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/SendReport/Barnet.pm')
-rw-r--r--perllib/FixMyStreet/SendReport/Barnet.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/SendReport/Barnet.pm b/perllib/FixMyStreet/SendReport/Barnet.pm
index 9a92686ec..05ca20809 100644
--- a/perllib/FixMyStreet/SendReport/Barnet.pm
+++ b/perllib/FixMyStreet/SendReport/Barnet.pm
@@ -80,9 +80,9 @@ sub send {
? $h{query} : $nearest_postcode; # use given postcode if available
# note: endpoint can be of form 'https://username:password@url'
- my $council_config = FixMyStreet::App->model("DB::Open311conf")->search( { area_id => COUNCIL_ID_BARNET} )->first;
- if ($council_config and $council_config->endpoint) {
- $interface->set_proxy($council_config->endpoint);
+ my $body = FixMyStreet::App->model("DB::Body")->search( { 'body_areas.area_id' => COUNCIL_ID_BARNET }, { join => "body_areas" } )->first;
+ if ($body and $body->endpoint) {
+ $interface->set_proxy($body->endpoint);
# Barnet web service doesn't like namespaces in the elements so use a prefix
$interface->set_prefix('urn');
# uncomment these lines to print XML that will be sent rather
@@ -90,7 +90,7 @@ sub send {
#$interface->outputxml(1);
#$interface->no_dispatch(1);
} else {
- die "Barnet webservice FAIL: looks like you're missing some config data: no endpoint (URL) found for area_id=" . COUNCIL_ID_BARNET;
+ die "Barnet webservice FAIL: looks like you're missing some config data: no endpoint (URL) found for area ID " . COUNCIL_ID_BARNET;
}
eval {