diff --git a/server/src/lib/score-mutation/update-score.ts b/server/src/lib/score-mutation/update-score.ts index cf44c4be7..032cc520c 100644 --- a/server/src/lib/score-mutation/update-score.ts +++ b/server/src/lib/score-mutation/update-score.ts @@ -67,6 +67,14 @@ export default async function UpdateScore(oldScore: ScoreDocument, newScore: Sco ); try { + if (newScore._id) { + logger.warn( + `Passed a score with _id to UpdateScore. This property should not be set. Deleting this property and continuing anyway.` + ); + // This property shouldn't be defined. + delete newScore._id; + } + await db.scores.update( { scoreID: oldScoreID,