aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Model
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Model')
-rw-r--r--perllib/FixMyStreet/App/Model/DB.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Model/DB.pm b/perllib/FixMyStreet/App/Model/DB.pm
index ffd867485..db8e72c27 100644
--- a/perllib/FixMyStreet/App/Model/DB.pm
+++ b/perllib/FixMyStreet/App/Model/DB.pm
@@ -5,6 +5,7 @@ use strict;
use warnings;
use FixMyStreet;
+use Catalyst::Utils;
use Moose;
with 'Catalyst::Component::InstancePerContext';
@@ -13,6 +14,10 @@ __PACKAGE__->config(
schema_class => 'FixMyStreet::DB::Schema',
connect_info => sub { FixMyStreet::DB->schema->storage->dbh },
);
+__PACKAGE__->config(
+ traits => ['QueryLog::AdoptPlack'],
+)
+ if Catalyst::Utils::env_value( 'FixMyStreet::App', 'DEBUG' );
sub build_per_context_instance {
my ( $self, $c ) = @_;