aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-05-26 13:23:12 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-05-26 13:23:12 +0100
commit14a70af1b2e89efef459cf206ef88683889ab10c (patch)
tree8d1b61d0638f58f456e1ef7b30cbd02de1aba6a4 /perllib/FixMyStreet/DB/Result/Comment.pm
parenta04abdebaf280cbfbad65fabb2c64d88f9e3d72c (diff)
parent0030a9d9760c1f8733fb5b64486aaa634d1023bb (diff)
Merge branch 'migrate_to_catalyst' of ssh://matthew@git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
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