feat 忽略找不到数据库记录的报错
This commit is contained in:
parent
07cb2d39ed
commit
8dfcdb4086
@ -35,6 +35,7 @@ func InitDefaultDatabase() (*gorm.DB, error) {
|
||||
SlowThreshold: time.Second,
|
||||
LogLevel: logger.Warn,
|
||||
Colorful: true,
|
||||
IgnoreRecordNotFoundError: true,
|
||||
},
|
||||
)
|
||||
return db, nil
|
||||
|
Loading…
Reference in New Issue
Block a user