aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Alert.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-04-25 10:53:39 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-02 22:09:30 +0100
commit1edb407cddcd26fda53066c8cc92e8e04ad003b9 (patch)
tree8bff0c223a9e5b3517dd1dcdd4235bbd27614fda /perllib/FixMyStreet/DB/Result/Alert.pm
parent54cad1e4d2474fba55485731ca9e2fd1779c524a (diff)
Refactor datetime inflation.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Alert.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Alert.pm21
1 files changed, 7 insertions, 14 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Alert.pm b/perllib/FixMyStreet/DB/Result/Alert.pm
index 2a52a7bca..31935bc32 100644
--- a/perllib/FixMyStreet/DB/Result/Alert.pm
+++ b/perllib/FixMyStreet/DB/Result/Alert.pm
@@ -8,7 +8,11 @@ use strict;
use warnings;
use base 'DBIx::Class::Core';
-__PACKAGE__->load_components("FilterColumn", "InflateColumn::DateTime", "EncodedColumn");
+__PACKAGE__->load_components(
+ "FilterColumn",
+ "FixMyStreet::InflateColumn::DateTime",
+ "EncodedColumn",
+);
__PACKAGE__->table("alert");
__PACKAGE__->add_columns(
"id",
@@ -65,8 +69,8 @@ __PACKAGE__->belongs_to(
);
-# Created by DBIx::Class::Schema::Loader v0.07035 @ 2015-08-13 16:33:38
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5RNyB430T8PqtFlmGV/MUg
+# Created by DBIx::Class::Schema::Loader v0.07035 @ 2019-04-25 12:03:14
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6pe/RralQASq3F7b/zZVkg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
@@ -75,17 +79,6 @@ use namespace::clean -except => [ 'meta' ];
with 'FixMyStreet::Roles::Abuser';
-my $stz = sub {
- my ( $orig, $self ) = ( shift, shift );
- my $s = $self->$orig(@_);
- return $s unless $s && UNIVERSAL::isa($s, "DateTime");
- FixMyStreet->set_time_zone($s);
- return $s;
-};
-
-around whensubscribed => $stz;
-around whendisabled => $stz;
-
=head2 confirm
$alert->confirm();