aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Alert.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Alert.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Alert.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Alert.pm b/perllib/FixMyStreet/DB/ResultSet/Alert.pm
index c61053fff..ddf80bc52 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Alert.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Alert.pm
@@ -7,11 +7,6 @@ use warnings;
sub timeline_created {
my ( $rs, $restriction ) = @_;
- my $prefetch =
- $rs->result_source->storage->sql_maker->quote_char ?
- [ qw/alert_type user/ ] :
- [ qw/alert_type/ ];
-
return $rs->search(
{
whensubscribed => { '>=', \"current_timestamp-'7 days'::interval" },
@@ -19,7 +14,7 @@ sub timeline_created {
%{ $restriction },
},
{
- prefetch => $prefetch,
+ prefetch => [ qw/alert_type user/ ],
}
);
}