aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Contact.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-09-12 13:45:14 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-09-12 13:57:20 +0100
commit05de4770022b21e7ff7ff87ee2c7bba358989f60 (patch)
treefc4b8cacba0022f8015963731ac438202dce2b51 /perllib/FixMyStreet/App/Controller/Contact.pm
parent7e1934d4f5aa61a467780193dcf966fecd50ea5d (diff)
Make sure determine_contact_type called later.
The request cobrand is set on the schema during the app's setup_request(), which is called by the root auto action. So anything in a controller's begin action will access an incorrect cobrand (if one has already been set).
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Contact.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Contact.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm
index c8cd14907..06566a8ab 100644
--- a/perllib/FixMyStreet/App/Controller/Contact.pm
+++ b/perllib/FixMyStreet/App/Controller/Contact.pm
@@ -33,7 +33,6 @@ sub begin : Private {
my ($self, $c) = @_;
$c->forward('/begin');
$c->forward('setup_request');
- $c->forward('determine_contact_type');
}
=head2 index
@@ -44,6 +43,7 @@ Display contact us page
sub index : Path : Args(0) {
my ( $self, $c ) = @_;
+ $c->forward('determine_contact_type');
}
=head2 submit
@@ -55,6 +55,7 @@ Handle contact us form submission
sub submit : Path('submit') : Args(0) {
my ( $self, $c ) = @_;
+ $c->forward('determine_contact_type');
$c->res->redirect( '/contact' ) and return unless $c->req->method eq 'POST';
$c->go('index') unless $c->forward('validate');