aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Questionnaire.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-03 18:54:00 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-03 18:54:00 +0100
commit05d706fe5a04499c8c4c0c5a0a6ce69f38c16815 (patch)
treee9c3cbd93477cb9a2cb8ea094ec22e2b1ff0c813 /perllib/FixMyStreet/App/Controller/Questionnaire.pm
parentdee51cb3a741be837a41924c96dfef479236401f (diff)
parent75e4f3e1176d14281d2063fd233626d029c30b1c (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
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} ) {