From 34f0afc1752ac022f184e45c2b0b62483dfa9a13 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 20 Jan 2019 12:22:42 -0700 Subject: [PATCH] Fix INSERT clause for cases of overlap --- core/achievement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/achievement.js b/core/achievement.js index 333b968c..d2ac2508 100644 --- a/core/achievement.js +++ b/core/achievement.js @@ -193,7 +193,7 @@ class Achievements { StatLog.incrementUserStat(info.client.user, UserProps.AchievementTotalPoints, info.details.points); UserDb.run( - `INSERT INTO user_achievement (user_id, achievement_tag, timestamp, match) + `INSERT OR IGNORE INTO user_achievement (user_id, achievement_tag, timestamp, match) VALUES (?, ?, ?, ?);`, [ info.client.user.userId, info.achievementTag, getISOTimestampString(info.timestamp), info.matchField ], err => {