diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-25 22:35:39 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-12-02 17:41:35 +0000 |
commit | 55412b79394ff1b1cabe368aed67fa8f68680ecc (patch) | |
tree | 33657093517818b8ba60f156484ec540f9c4af17 /bin/update-all-reports | |
parent | 0c2a792b154e1b28528db887bbde80b19268b9fe (diff) |
Reduce use of FixMyStreet::App.
Command line scripts don't need a full blown app, just database.
Diffstat (limited to 'bin/update-all-reports')
-rwxr-xr-x | bin/update-all-reports | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/update-all-reports b/bin/update-all-reports index 0627cedc2..25405e8ad 100755 --- a/bin/update-all-reports +++ b/bin/update-all-reports @@ -17,7 +17,9 @@ BEGIN { require "$d/../setenv.pl"; } -use FixMyStreet::App; +use FixMyStreet; +use FixMyStreet::DB; + use File::Path (); use File::Slurp; use JSON; @@ -32,7 +34,7 @@ if ( FixMyStreet->config('BASE_URL') =~ /zurich|zueri/ ) { $age_column = 'created'; } -my $problems = FixMyStreet::App->model("DB::Problem")->search( +my $problems = FixMyStreet::DB->resultset('Problem')->search( { state => [ FixMyStreet::DB::Result::Problem->visible_states() ], }, |