From be39ced967cb21708caa88302a2feb6ade6de2c9 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 27 Sep 2022 11:27:36 -0400 Subject: [PATCH] workaround DBICx::Sugar alias only working for non-default --- lib/App/Netdisco/Configuration.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/App/Netdisco/Configuration.pm b/lib/App/Netdisco/Configuration.pm index d2106915..61023d7f 100644 --- a/lib/App/Netdisco/Configuration.pm +++ b/lib/App/Netdisco/Configuration.pm @@ -48,7 +48,7 @@ if (ref {} eq ref setting('database')) { # set up the netdisco schema now we have access to the config # but only if it doesn't exist from an earlier config style - setting('plugins')->{DBIC}->{netdisco} ||= { + setting('plugins')->{DBIC}->{'default'} ||= { dsn => $dsn, user => $user, password => $pass, @@ -96,7 +96,7 @@ if (ref {} eq ref setting('database')) { } # and support tenancies by setting what the default schema points to - setting('plugins')->{DBIC}->{'default'}->{'alias'} = 'netdisco'; + setting('plugins')->{DBIC}->{'netdisco'}->{'alias'} = 'default'; } # always set this