aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index f496fb062..f1665ccba 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -134,7 +134,7 @@ sub whensent_local {
return $self->whensent
? $self->whensent->set_time_zone($tz)
- : $self->confirmed;
+ : $self->whensent;
}
sub lastupdate_local {
@@ -145,6 +145,13 @@ sub lastupdate_local {
: $self->lastupdate;
}
+around service => sub {
+ my ( $orig, $self ) = ( shift, shift );
+ my $s = $self->$orig(@_);
+ $s =~ s/_/ /g;
+ return $s;
+};
+
=head2 check_for_errors
$error_hashref = $problem->check_for_errors();