aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Questionnaire.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index 766c886f7..58c88979d 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -174,11 +174,12 @@ sub submit_standard : Private {
$reported = 0 if $c->stash->{reported} eq 'No';
my $q = $c->stash->{questionnaire};
- $q->whenanswered( \'ms_current_timestamp()' );
- $q->ever_reported( $reported );
- $q->old_state( $old_state );
- $q->new_state( $c->stash->{been_fixed} eq 'Unknown' ? 'unknown' : ($new_state || $old_state) );
- $q->update;
+ $q->update( {
+ whenanswered => \'ms_current_timestamp()',
+ ever_reported => $reported,
+ old_state => $old_state,
+ new_state => $c->stash->{been_fixed} eq 'Unknown' ? 'unknown' : ($new_state || $old_state),
+ } );
# Record an update if they've given one, or if there's a state change
if ( $new_state || $c->stash->{update} ) {