fix: Attributes Not Updating (#17275)

This commit is contained in:
Benny Joo
2024-10-23 14:42:42 -04:00
committed by GitHub
parent 596dc3fbd7
commit 123a39bd9a
@@ -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 list
await prisma.attributeToUser.deleteMany({
where: {