aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-16 14:11:58 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-16 14:11:58 +0100
commit5778fd32d04ac1a41ec4f0adc3325c3ed6a79a51 (patch)
tree98d662caac1bf02765b87e8a94ef1692f14508b0
parentb1ccde8a525f1e70b65a14f4d9b7073f16ebb648 (diff)
Tokens can look at all reports.
-rw-r--r--perllib/FixMyStreet/App/Controller/Tokens.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm
index 1434838f2..8bab84979 100644
--- a/perllib/FixMyStreet/App/Controller/Tokens.pm
+++ b/perllib/FixMyStreet/App/Controller/Tokens.pm
@@ -34,7 +34,8 @@ sub confirm_problem : Path('/P') {
# Load the problem
my $data = $auth_token->data;
my $problem_id = ref $data ? $data->{id} : $data;
- my $problem = $c->cobrand->problems->find( { id => $problem_id } )
+ # Look at all problems, not just cobrand, in case am approving something we don't actually show
+ my $problem = $c->model('DB::Problem')->find( { id => $problem_id } )
|| $c->detach('token_error');
$c->stash->{problem} = $problem;