diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-04-24 18:46:49 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-04-24 18:46:49 +0100 |
commit | 260fc363d45fb49b09f8ea27625c9c275bc2848e (patch) | |
tree | 4af0932e715fb1e8825bf2964b78dd49fc88ab16 /perllib/FixMyStreet/DB/ResultSet/Problem.pm | |
parent | f70ef9f6a612d3387db24519e163e6b326a9fb64 (diff) |
Do not calculate user count on status page.
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Problem.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 5b2079831..3e48170d8 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -241,12 +241,9 @@ sub unique_users { return $rs->search( { state => [ FixMyStreet::DB::Result::Problem->visible_states() ], }, { - select => [ { distinct => 'user_id' } ], - as => [ 'user_id' ] - } )->as_subselect_rs->search( undef, { - select => [ { count => 'user_id' } ], - as => [ 'count' ] - } )->first->get_column('count'); + columns => [ 'user_id' ], + distinct => 1, + } ); } sub categories_summary { |