Fixing fetching team with parent (#10677)

Co-authored-by: Omar López <zomars@me.com>
This commit is contained in:
Leo Giovanetti
2023-08-09 21:05:28 +00:00
committed by GitHub
co-authored by Omar López
parent 4c38ea3329
commit 4dfbc46247
+1 -1
View File
@@ -99,7 +99,7 @@ export async function getTeamWithMembers(args: {
const where: Prisma.TeamFindFirstArgs["where"] = {};
if (userId) where.members = { some: { userId } };
if (orgSlug) {
if (orgSlug && orgSlug !== slug) {
where.parent = getSlugOrRequestedSlug(orgSlug);
}
if (id) where.id = id;