diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-03-13 11:59:01 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-03-13 12:03:05 +0000 |
commit | 797546c15d00dee15051495901c1dbbf96b0508f (patch) | |
tree | 5e8b14c0ddb220a74c73ebf56aee838028dfcf08 | |
parent | 67a861664e3e58af3679b59c3272fca462cbed51 (diff) |
Fix slight regression in cf20c709, to still match all UK cobrands.
-rw-r--r-- | perllib/Open311.pm | 2 | ||||
-rw-r--r-- | t/open311.t | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index c8289a442..9b7614960 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -173,7 +173,7 @@ sub _generate_service_request_description { my $extra = shift; my $description = ""; - if ($problem->cobrand eq 'fixmystreet') { + if ($extra->{easting_northing}) { # Proxy for cobrand being in the UK $description .= "detail: " . $problem->detail . "\n\n"; $description .= "url: " . $extra->{url} . "\n\n"; $description .= "Submitted via FixMyStreet\n"; diff --git a/t/open311.t b/t/open311.t index a029c7502..f23198ea5 100644 --- a/t/open311.t +++ b/t/open311.t @@ -70,6 +70,7 @@ my $problem = FixMyStreet::App->model('DB::Problem')->new( { subtest 'posting service request' => sub { my $extra = { url => 'http://example.com/report/1', + easting_northing => 'SET', }; my $results = make_service_req( $problem, $extra, $problem->category, '<?xml version="1.0" encoding="utf-8"?><service_requests><request><service_request_id>248</service_request_id></request></service_requests>' ); |