aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-08 13:51:17 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-08 13:51:17 +0100
commit500190d03fcbfd8993f46b61bca9e12a7339dbc2 (patch)
tree3398fbde51e5ef35040b6d9611cb2eabd618071d /perllib/FixMyStreet/App/Controller/Report
parente19d63897578e31cf40cc185a663cebd8edb9c14 (diff)
Switch to using c->cobrand->problems to return all problems for a cobrand (so on Barnet only return Barnet problems).
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 5c52d0257..4d9bcd672 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -289,7 +289,7 @@ sub initialize_report : Private {
|| last;
# load the related problem
- $report = $c->model("DB::Problem") #
+ $report = $c->cobrand->problems #
->search( { id => $id, state => 'partial' } ) #
->first;
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index fe512d03c..2ca9245ad 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -99,7 +99,7 @@ sub setup_page : Private {
my ( $self, $c ) = @_;
my $problem =
- $c->model('DB::Problem')->find( { id => $c->req->param('id') } );
+ $c->cobrand->problems->find( { id => $c->req->param('id') } );
return unless $problem;