2
0

🚑 Fix answer upsert on duplicate itemId

This commit is contained in:
Baptiste Arnaud
2023-07-01 22:20:22 +02:00
parent 24126ac9b8
commit 92740ad2ff

View File

@@ -221,12 +221,12 @@ const saveAnswer =
blockId: block.id, blockId: block.id,
groupId: block.groupId, groupId: block.groupId,
}, },
itemId: answer.itemId,
}, },
create: { ...answer, resultId }, create: { ...answer, resultId },
update: { update: {
content: answer.content, content: answer.content,
storageUsed: answer.storageUsed, storageUsed: answer.storageUsed,
itemId: answer.itemId,
}, },
}) })
} }