fix: do_grp_add_admins
Some checks failed
migrate-stage / migrate-stage (push) Successful in 6s
gen-migrations / gen-migrations (push) Failing after 12s
migrate-devel / migrate-devel (push) Failing after 4s

This commit is contained in:
Orion Kindel 2023-07-20 15:45:18 -05:00
parent 371215449d
commit 38893b5861
Signed by untrusted user who does not match committer: orion
GPG Key ID: 6D4165AE4C928719
3 changed files with 7 additions and 7 deletions

@ -1 +1 @@
Subproject commit cecef81fff41fd07cf6c450e1dda69c1215525a5
Subproject commit 9b8a0f29475dc31b30bf77d6aca1683c9b4769a2

View File

@ -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

View File

@ -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;
$$;