workaround DBICx::Sugar alias only working for non-default

This commit is contained in:
Oliver Gorwits
2022-09-27 11:27:36 -04:00
parent 72c17c35e2
commit be39ced967

View File

@@ -48,7 +48,7 @@ if (ref {} eq ref setting('database')) {
# set up the netdisco schema now we have access to the config # set up the netdisco schema now we have access to the config
# but only if it doesn't exist from an earlier config style # but only if it doesn't exist from an earlier config style
setting('plugins')->{DBIC}->{netdisco} ||= { setting('plugins')->{DBIC}->{'default'} ||= {
dsn => $dsn, dsn => $dsn,
user => $user, user => $user,
password => $pass, password => $pass,
@@ -96,7 +96,7 @@ if (ref {} eq ref setting('database')) {
} }
# and support tenancies by setting what the default schema points to # 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 # always set this