fix: do_grp_add_admins
This commit is contained in:
parent
371215449d
commit
38893b5861
@ -1 +1 @@
|
||||
Subproject commit cecef81fff41fd07cf6c450e1dda69c1215525a5
|
||||
Subproject commit 9b8a0f29475dc31b30bf77d6aca1683c9b4769a2
|
@ -21,9 +21,9 @@ create function public.do_grp_add_admins()
|
||||
declare
|
||||
admins int[];
|
||||
begin
|
||||
select array_agg(usr.id)
|
||||
from public.grp_members_admins() as usr
|
||||
into admins;
|
||||
admins := ( select array_agg(usr.id)
|
||||
from public.grp_members_admins() as usr
|
||||
);
|
||||
|
||||
perform public.grp_add_members( to_grp => NEW.id
|
||||
, add_usrs => admins
|
||||
|
@ -35,9 +35,9 @@ create function public.grp_members(of_grp int)
|
||||
as $$
|
||||
begin
|
||||
return query select u.*
|
||||
from public.usr u
|
||||
inner join public.grp_usr gu
|
||||
on gu.usr = u.id and gu.grp = of_grp;
|
||||
from public.grp_usr gu
|
||||
inner join public.usr u on gu.usr = u.id
|
||||
where gu.grp = of_grp;
|
||||
end;
|
||||
$$;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user