Skip to content

Commit

Permalink
wip: fix for named grants
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Dec 4, 2024
1 parent 85426ae commit 035ebc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Ravada.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ sub _clean_wrong_access_group($self) {
$sth->execute;
while ( my $row = $sth->fetchrow_hashref ) {
next if !$row;
my $key = $row->{id_domain}.":".$row->{id_group}.":".($row->{type} or '');
my $key = $row->{id_domain}.":".($row->{id_group} or 0).":".($row->{name} or '').":".($row->{type} or '');
if ($dupe{$key}++) {
$sth_del->execute($row->{id});
}
Expand Down Expand Up @@ -1584,6 +1584,7 @@ sub _add_indexes_generic($self) {
,group_access => [
"unique (id_domain,name,id_group)"
,"unique (id_domain,id_group,type)"
,"unique (id_domain,name,type)"
,"index(id_domain)"
,"index(id_group)"
]
Expand Down

0 comments on commit 035ebc9

Please sign in to comment.