diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-01-15 05:17:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 23:17:03 +0200 |
commit | 84b147c7f0c2575723d3471783cb24078232fe7a (patch) | |
tree | 3b7ebea85a9be9deaffceb5e836c8073a604799b /models/models.go | |
parent | 60a3297a33b2209ae7acf6fd84afd62e095e01aa (diff) | |
download | gitea-84b147c7f0c2575723d3471783cb24078232fe7a.tar.gz gitea-84b147c7f0c2575723d3471783cb24078232fe7a.zip |
Use IsProd instead of testing if it's equal. (#14336)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/models.go b/models/models.go index f12a4e8b30..2ace1ea6dd 100644 --- a/models/models.go +++ b/models/models.go @@ -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...) } |