aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App.pm1
-rw-r--r--perllib/FixMyStreet/App/Model/DB.pm1
-rw-r--r--perllib/FixMyStreet/DB/Schema.pm2
3 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index a09f86f85..a0477ca40 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -173,6 +173,7 @@ sub setup_request {
$c->setup_dev_overrides();
my $cobrand = $c->cobrand;
+ FixMyStreet::DB->schema->cobrand($cobrand);
$cobrand->call_hook('add_response_headers');
diff --git a/perllib/FixMyStreet/App/Model/DB.pm b/perllib/FixMyStreet/App/Model/DB.pm
index db8e72c27..c116abffc 100644
--- a/perllib/FixMyStreet/App/Model/DB.pm
+++ b/perllib/FixMyStreet/App/Model/DB.pm
@@ -21,6 +21,7 @@ __PACKAGE__->config(
sub build_per_context_instance {
my ( $self, $c ) = @_;
+ # $self->schema->cobrand($c->cobrand);
$self->schema->cache({});
return $self;
}
diff --git a/perllib/FixMyStreet/DB/Schema.pm b/perllib/FixMyStreet/DB/Schema.pm
index 10bbd434f..be39069d8 100644
--- a/perllib/FixMyStreet/DB/Schema.pm
+++ b/perllib/FixMyStreet/DB/Schema.pm
@@ -25,6 +25,8 @@ __PACKAGE__->connection(FixMyStreet->dbic_connect_info);
has lang => ( is => 'rw' );
+has cobrand => ( is => 'rw' );
+
has cache => ( is => 'rw', lazy => 1, default => sub { {} } );
1;