diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-05-26 19:21:39 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-05-26 19:21:39 +0100 |
commit | efc53f171be30edc9995762cad949eda01294e96 (patch) | |
tree | 7db3234e6967eca673685d4cecbfe9983ef17795 /perllib/FixMyStreet/App/Controller/Questionnaire.pm | |
parent | 67cfdc9bf5948bec4c4f88e19ac1b4e7370a995f (diff) |
Perl boolean false is '', which the DB doesn't like.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Questionnaire.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm index 25d24c212..c6d7e7634 100755 --- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm +++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm @@ -98,7 +98,7 @@ sub submit_creator_fixed : Private { ); unless ( $questionnaire->in_storage ) { - $questionnaire->ever_reported( $c->stash->{reported} eq 'Yes' ); + $questionnaire->ever_reported( $c->stash->{reported} eq 'Yes' ? 1 : 0 ); $questionnaire->whensent( \'ms_current_timestamp()' ); $questionnaire->whenanswered( \'ms_current_timestamp()' ); $questionnaire->insert; @@ -145,8 +145,8 @@ sub submit_standard : Private { # Record questionnaire response my $reported = undef; - $reported = 't' if $c->stash->{reported} eq 'Yes'; - $reported = 'f' if $c->stash->{reported} eq 'No'; + $reported = 1 if $c->stash->{reported} eq 'Yes'; + $reported = 0 if $c->stash->{reported} eq 'No'; my $q = $c->stash->{questionnaire}; $q->whenanswered( \'ms_current_timestamp()' ); |