#929 implement first half of multi tenancy with tenant_databases setting

This commit is contained in:
Oliver Gorwits
2022-09-24 19:01:05 +01:00
parent b391f83d60
commit 1d5f3ce316
71 changed files with 355 additions and 205 deletions

View File

@@ -13,8 +13,8 @@ register_admin_task({
});
ajax '/ajax/content/admin/duplicatedevices' => require_role admin => sub {
my @set = schema('netdisco')->resultset('Device')->search({
serial => { '-in' => schema('netdisco')->resultset('Device')->search({
my @set = schema(vars->{'tenant'})->resultset('Device')->search({
serial => { '-in' => schema(vars->{'tenant'})->resultset('Device')->search({
'-and' => [serial => { '!=', undef }, serial => { '!=', '' }],
}, {
group_by => ['serial'],