aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 66216aa6e..9b5feb37d 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -79,7 +79,13 @@ sub created_local {
}
sub confirmed_local {
- return shift->confirmed->set_time_zone($tz);
+ my $self = shift;
+
+ # if confirmed is null then it doesn't get inflated so don't
+ # try and set the timezone
+ return $self->confirmed->set_time_zone($tz) if $self->confirmed;
+
+ return 0;
}
# You can replace this text with custom code or comments, and it will be preserved on regeneration