Use IsProd instead of testing if it's equal. (#14336)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Lunny Xiao 2021-01-15 05:17:03 +08:00 committed by GitHub
parent 60a3297a33
commit 84b147c7f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 14 deletions

View file

@ -175,8 +175,8 @@ func NewTestEngine() (err error) {
}
x.SetMapper(names.GonicMapper{})
x.SetLogger(NewXORMLogger(!setting.ProdMode))
x.ShowSQL(!setting.ProdMode)
x.SetLogger(NewXORMLogger(!setting.IsProd()))
x.ShowSQL(!setting.IsProd())
return x.StoreEngine("InnoDB").Sync2(tables...)
}