Fix duplicated data returned by Prisma query in team availability view (#18416)
Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
1 parent
116c765c36
commit
d8027fe248
1 file changed
+1
-3
+1
-3
@@ -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"],
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user