Fixing fetching team with parent (#10677)

Co-authored-by: Omar López <[email protected]>
This commit is contained in:
Leo GiovanettiandOmar López authored and GitHub committed 2023-08-09 21:05:28 +00:00
1 parent 4c38ea3329
commit 4dfbc46247
1 file changed
+1 -1
+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;