feat 忽略找不到数据库记录的报错

This commit is contained in:
timerzz 2024-09-03 15:21:54 +08:00
parent 07cb2d39ed
commit 8dfcdb4086

View File

@ -35,6 +35,7 @@ func InitDefaultDatabase() (*gorm.DB, error) {
SlowThreshold: time.Second,
LogLevel: logger.Warn,
Colorful: true,
IgnoreRecordNotFoundError: true,
},
)
return db, nil