diff options
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index 2980b3811..9a19f471e 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -80,7 +80,20 @@ sub determine_contact_type : Private { $update_id = undef unless $update_id && $update_id =~ /^[1-9]\d*$/; if ($id) { - my $problem = $c->model('DB::Problem')->find( { id => $id } ); + my $problem = $c->model('DB::Problem')->find( + { id => $id }, + { + 'select' => [ + 'title', 'detail', 'name', + 'anonymous', + 'user_id', + { + extract => 'epoch from confirmed', + -as => 'confirmed' + } + ] + } + ); if ( $update_id ) { # my $u = dbh()->selectrow_hashref( |