Skip to content

Commit

Permalink
Merge pull request #11 from AAStarCommunity/main
Browse files Browse the repository at this point in the history
[chore]sync with main
  • Loading branch information
fanhousanbu authored May 2, 2024
2 parents 1669a11 + 6483956 commit 70df265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conf/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var onceDb sync.Once
// GetDbClient 获取数据库连接对象
func GetDbClient() *gorm.DB {
onceDb.Do(func() {
if os.Getenv("UnitTestEnv") == "1" {
if os.Getenv("UnitTestEnv") == "1" || os.Getenv("LocalDebug") == "true" {
db, _ = getInMemoryDbClient()
db = db.Debug()
} else {
Expand Down

0 comments on commit 70df265

Please sign in to comment.