fix: eventType-getByViewer subselect on children->users[] (#9668)
parent
ab6781cd72
commit
b7c3b31e0c
|
@ -420,7 +420,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
|
|||
truncateAfter={4}
|
||||
items={type.children
|
||||
.flatMap((ch) => ch.users)
|
||||
.map((user: User) => ({
|
||||
.map((user: Pick<User, "name" | "username">) => ({
|
||||
alt: user.name || "",
|
||||
image: `${WEBAPP_URL}/${user.username}/avatar.png`,
|
||||
title: user.name || "",
|
||||
|
|
|
@ -45,7 +45,9 @@ const eventTypeSelect = Prisma.validator<Prisma.EventTypeSelect>()({
|
|||
},
|
||||
children: {
|
||||
include: {
|
||||
users: true,
|
||||
users: {
|
||||
select: baseUserSelect,
|
||||
},
|
||||
},
|
||||
},
|
||||
parentId: true,
|
||||
|
|
Loading…
Reference in New Issue