diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-05-13 12:59:53 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-05-13 12:59:53 +0100 |
commit | 47494a7c801bd9e87d545d1b1e4e09cfe76bf30a (patch) | |
tree | e9d1e9599d5fca7f2a9b200a531d28517f2e895e /perllib/FixMyStreet | |
parent | 6c8696c6c92860c8fcd2c97ebfbe01f3856c8502 (diff) |
Explicitly exclude unconfirmed reports.
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Open311.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Open311.pm b/perllib/FixMyStreet/App/Controller/Open311.pm index b336a44f0..127f9b8f5 100644 --- a/perllib/FixMyStreet/App/Controller/Open311.pm +++ b/perllib/FixMyStreet/App/Controller/Open311.pm @@ -303,8 +303,10 @@ sub get_requests : Private { my $max_requests = $c->req->param('max_requests') || 0; # Only provide access to the published reports + my $states = FixMyStreet::DB::Result::Problem->visible_states(); + delete $states->{unconfirmed}; my $criteria = { - state => [ FixMyStreet::DB::Result::Problem->visible_states() ] + state => [ keys %$states ] }; my %rules = ( @@ -403,8 +405,10 @@ sub get_request : Private { return; } + my $states = FixMyStreet::DB::Result::Problem->visible_states(); + delete $states->{unconfirmed}; my $criteria = { - state => [ FixMyStreet::DB::Result::Problem->visible_states() ], + state => [ keys %$states ], id => $id, }; $c->forward( 'output_requests', [ $criteria ] ); |