Skip to content

Commit

Permalink
GORM query fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowing committed Jan 3, 2020
1 parent 8622a91 commit d9ee475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/api/get5.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func MatchMapUpdateHandler(w http.ResponseWriter, r *http.Request) {
return
}
MapStats := db.MapStatsData{}
MapStatsRecord := db.SQLAccess.Gorm.Where("match_id = ? AND map_number", matchid, mapnumber).First(&MapStats)
MapStatsRecord := db.SQLAccess.Gorm.Where("match_id = ? AND map_number = ?", matchid, mapnumber).First(&MapStats)
MapStatsUpdate := MapStats
db.SQLAccess.Gorm.First(&MapStatsUpdate)
if !MapStatsRecord.RecordNotFound() {
Expand Down

0 comments on commit d9ee475

Please sign in to comment.