Ensure position is present (#5291)

This commit is contained in:
Hariom Balhara 2022-10-31 17:43:04 +05:30 committed by GitHub
parent 5c2ad7827e
commit dd9d32815a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,6 +299,8 @@ const loggedInViewerRouter = createProtectedRouter()
async resolve({ ctx }) {
const { prisma } = ctx;
const eventTypeSelect = Prisma.validator<Prisma.EventTypeSelect>()({
// Position is required by lodash to sort on it. Don't remove it, TS won't complain but it would silently break reordering
position: true,
hashedLink: true,
destinationCalendar: true,
team: {