aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-13 10:28:20 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-13 10:28:20 +0100
commite1a078d41d5b3be4fd45f2fdcedef69d8660dac7 (patch)
treebeef7321607e8a28249f9dd81c4f882a63d0427d
parentb79082d29504baf7819e59f0ac20090df75b2ab6 (diff)
Show error if no questionnaire found.
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index b4c9ade92..1a1352529 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -33,6 +33,8 @@ sub load_questionnaire : Private {
{ id => $c->stash->{id} },
{ prefetch => 'problem' }
);
+ $c->detach('missing_problem') unless $questionnaire;
+
$c->stash->{questionnaire} = $questionnaire;
my $problem_id = $questionnaire->problem_id;