mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-09 15:19:50 +03:00
Make sure update-score removes a score if all references to it are popped
This commit is contained in:
@@ -75,8 +75,11 @@ export default async function UpdateScore(oldScore: ScoreDocument, newScore: Sco
|
||||
);
|
||||
} catch (err) {
|
||||
logger.warn(
|
||||
`Score ID ${newScoreID} already existed -- this update caused a collision. Updating old references anyway.`
|
||||
`Score ID ${newScoreID} already existed -- this update caused a collision. Removing old score and updating old references anyway.`
|
||||
);
|
||||
await db.scores.remove({
|
||||
scoreID: oldScoreID,
|
||||
});
|
||||
}
|
||||
|
||||
const sessions = await db.sessions.find({
|
||||
|
||||
Reference in New Issue
Block a user