Skip to content

Commit bb4af23

Browse files
committed
Fix query order
1 parent 8b2a5e4 commit bb4af23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/console/commands/remove_mod_clan_scores.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var RemoveUnrankedClanScores = &cobra.Command{
1414
scores := make([]*db.Score, 0)
1515

1616
result := db.SQL.
17-
Where("clan_id IS NOT NULL and mods > 0").
17+
Where("clan_id IS NOT NULL AND mods > 0").
1818
Find(&scores)
1919

2020
if result.Error != nil {
@@ -28,8 +28,8 @@ var RemoveUnrankedClanScores = &cobra.Command{
2828
}
2929

3030
err := db.SQL.Model(&db.Score{}).
31-
Update("clan_id", nil).
32-
Where("id = ?", score.Id).Error
31+
Where("id = ?", score.Id).
32+
Update("clan_id", nil).Error
3333

3434
if err != nil {
3535
logrus.Error(err)

0 commit comments

Comments
 (0)