diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-10-23 14:58:30 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-10-23 14:58:30 +0100 |
commit | da52879e407ffa683567e349c744f30171065a76 (patch) | |
tree | 4d02bc41b672de596903d8224894bb10745c7f12 /perllib/FixMyStreet/DB/ResultSet/Problem.pm | |
parent | 239148e9ba1e55ce205f4ec134c0baab104b0208 (diff) | |
parent | af7a602d2c83bdf0371ae253f5ba3f80cece077d (diff) |
Merge branch '1251-json-status-page'
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Problem.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 40076d374..e9f5d0f8e 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -210,7 +210,10 @@ sub unique_users { return $rs->search( { state => [ FixMyStreet::DB::Result::Problem->visible_states() ], }, { - select => [ { count => { distinct => 'user_id' } } ], + select => [ { distinct => 'user_id' } ], + as => [ 'user_id' ] + } )->as_subselect_rs->search( undef, { + select => [ { count => 'user_id' } ], as => [ 'count' ] } )->first->get_column('count'); } |