aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Comment.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-07-02 14:20:42 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-07-02 14:20:42 +0100
commit510af28e0bcda19b4f2bf181aaebc05975a7533f (patch)
treed8e6791fc62c9bb905794a9f24db0aa0b055de78 /perllib/FixMyStreet/DB/ResultSet/Comment.pm
parent3dd1d1f2cb68b731d23ecea9eb580fe08a190ce8 (diff)
parent0fee017e4a3d3aac6653f2892cc0950d354f3f91 (diff)
Merge branch '1084-quote-names'
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Comment.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Comment.pm b/perllib/FixMyStreet/DB/ResultSet/Comment.pm
index b9a3df62d..034b86a40 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Comment.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Comment.pm
@@ -13,18 +13,13 @@ sub to_body {
sub timeline {
my ( $rs ) = @_;
- my $prefetch =
- $rs->result_source->storage->sql_maker->quote_char ?
- [ qw/user/ ] :
- [];
-
return $rs->search(
{
'me.state' => 'confirmed',
'me.created' => { '>=', \"current_timestamp-'7 days'::interval" },
},
{
- prefetch => $prefetch,
+ prefetch => 'user',
}
);
}