The CountActiveOwnerByOrganizationID query joins iam_membership_profiles with iam_memberships, but used an unqualified tenant_id = @tenant_id in the WHERE clause. Since both tables have a tenant_id column, PostgreSQL raised an "ambiguous column" error when deleting an owner. Fixed by prefixing with the table alias (p.tenant_id) to match the pattern used in CountByOrganizationID. Added TestUser_RemoveOwner e2e test to verify one owner can remove another. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
7.4 KiB
7.4 KiB