From bb4af23e9b141f7d2e1a792947cfc93a07bcd1a1 Mon Sep 17 00:00:00 2001 From: Swan Date: Sun, 24 Nov 2024 10:15:58 -0500 Subject: [PATCH] Fix query order --- cmd/console/commands/remove_mod_clan_scores.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/console/commands/remove_mod_clan_scores.go b/cmd/console/commands/remove_mod_clan_scores.go index 50db66c..eda122c 100644 --- a/cmd/console/commands/remove_mod_clan_scores.go +++ b/cmd/console/commands/remove_mod_clan_scores.go @@ -14,7 +14,7 @@ var RemoveUnrankedClanScores = &cobra.Command{ scores := make([]*db.Score, 0) result := db.SQL. - Where("clan_id IS NOT NULL and mods > 0"). + Where("clan_id IS NOT NULL AND mods > 0"). Find(&scores) if result.Error != nil { @@ -28,8 +28,8 @@ var RemoveUnrankedClanScores = &cobra.Command{ } err := db.SQL.Model(&db.Score{}). - Update("clan_id", nil). - Where("id = ?", score.Id).Error + Where("id = ?", score.Id). + Update("clan_id", nil).Error if err != nil { logrus.Error(err)