diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-04 17:14:36 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-04 17:14:36 +0000 |
commit | be1d7f07903d7291dde8da19f78935233e383597 (patch) | |
tree | 3c3fc912a3c3a51f193917d9d6667a504f432e2a /perllib/Open311 | |
parent | cef6a4660efcf95c7d77cdf76facf186d051f184 (diff) |
Remove all special body handling in order to move FMB to use bodies properly.
Diffstat (limited to 'perllib/Open311')
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index e4416f792..aae0940c7 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -88,13 +88,11 @@ sub update_comments { next unless $request_id; my $problem; - my $criteria = { external_id => $request_id }; - if ($open311->jurisdiction =~ /^fixmybarangay_(dps|dpwh|depw)$/i) { # use jurisdiction (not area_id) for FMB bodies - $criteria->{ external_body } = uc $1; - } else { + my $criteria = { + external_id => $request_id, # XXX This assumes that areas will actually only be one area. - $criteria->{ bodies_str } = { like => '%' . join(",", keys %{$body_details->{areas}}) . '%' }; - } + bodies_str => { like => '%' . join(",", keys %{$body_details->{areas}}) . '%' }, + }; $problem = FixMyStreet::App->model('DB::Problem')->search( $criteria ); if (my $p = $problem->first) { |