Scheduling infrastructure for absolutely everyone.
fix: Attributes Not Updating (#17275)
Benny Joo123a39bd9abf
diff --git a/packages/trpc/server/routers/viewer/attributes/assignUserToAttribute.handler.ts b/packages/trpc/server/routers/viewer/attributes/assignUserToAttribute.handler.tsindex 064f86ae624..f1568f4a6b7 100644--- a/packages/trpc/server/routers/viewer/attributes/assignUserToAttribute.handler.ts+++ b/packages/trpc/server/routers/viewer/attributes/assignUserToAttribute.handler.ts@@ -148,21 +148,9 @@ const assignUserToAttributeHandler = async ({ input, ctx }: GetOptions) => {id: true,},});- } else if (!attribute.value && attribute.options && attribute.options.length > 0) {+ } else if (!attribute.value && attribute.options) {const options = attribute.options;- // Get all users attributes for this attribute- await prisma.attributeToUser.findMany({- where: {- attributeOption: {- attribute: {- id: attribute.id,- },- },- memberId: membership.id,- },- });-// Delete all users attributes for this attribute that are not in the options listawait prisma.attributeToUser.deleteMany({where: {