fix: remove redundant AND (#3833)

Co-authored-by: hussamkhatib <hussamkhatib@gmail.com>
This commit is contained in:
mohammed hussam
2022-08-15 16:35:44 -06:00
committed by GitHub
co-authored by hussamkhatib
parent 497d4902af
commit 732acb5b25
+1 -1
View File
@@ -99,7 +99,7 @@ async function getUserPageProps(context: GetStaticPropsContext) {
slug,
/* Free users can only display their first eventType */
id: user.plan === UserPlan.FREE ? eventTypeIds[0] : undefined,
AND: [{ OR: [{ userId: user.id }, { users: { some: { id: user.id } } }] }],
OR: [{ userId: user.id }, { users: { some: { id: user.id } } }],
},
// Order is important to ensure that given a slug if there are duplicates, we choose the same event type consistently when showing in event-types list UI(in terms of ordering and disabled event types)
// TODO: If we can ensure that there are no duplicates for a [slug, userId] combination in existing data, this requirement might be avoided.