mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-22 06:40:43 +08:00
fix(pkg): fix the conflict between rank field and built-in function (#38)
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ func (s *Server) UpdateRules() error {
|
||||
db := database.DB.Model(new(Rule))
|
||||
defer s.rulesLock.Unlock()
|
||||
s.rulesLock.Lock()
|
||||
return errors.Wrap(db.Order("rank desc").Find(&s.rules).Error, "MySQL update rules error")
|
||||
return errors.Wrap(db.Order("`rank` desc").Find(&s.rules).Error, "MySQL update rules error")
|
||||
}
|
||||
|
||||
// NewConnection is part of the mysql.Handler interface.
|
||||
|
||||
Reference in New Issue
Block a user