This commit is contained in:
rainesli 2020-04-27 09:00:49 +08:00
parent 5d02c9719d
commit 251529813a

View File

@ -620,7 +620,7 @@ func (s *DB) NewRecord(value interface{}) bool {
// RecordNotFound check if returning ErrRecordNotFound error
func (s *DB) RecordNotFound() bool {
for _, err := range s.GetErrors() {
if err == ErrRecordNotFound {
if err.Error() == ErrRecordNotFound.Error() {
return true
}
}