Skip to content

Commit

Permalink
Fix duplicated data returned by Prisma query in team availability view (
Browse files Browse the repository at this point in the history
#18416)

Co-authored-by: Udit Takkar <[email protected]>
  • Loading branch information
cnhhoang850 and Udit-takkar authored Dec 30, 2024
1 parent 116c765 commit d8027fe
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ async function getTeamMembers({
},
cursor: cursor ? { id: cursor } : undefined,
take: limit + 1, // We take +1 as itll be used for the next cursor
orderBy: {
id: "asc",
},
orderBy: [{ userId: "asc" }, { id: "asc" }], // Prisma require a unique field for tie breaking duplicate value for pagination
distinct: ["userId"],
});

Expand Down

0 comments on commit d8027fe

Please sign in to comment.