aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-05-26 19:21:39 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-05-26 19:21:39 +0100
commitefc53f171be30edc9995762cad949eda01294e96 (patch)
tree7db3234e6967eca673685d4cecbfe9983ef17795
parent67cfdc9bf5948bec4c4f88e19ac1b4e7370a995f (diff)
Perl boolean false is '', which the DB doesn't like.
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm6
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()' );