Merge pull request #1438 from tux-mind/master

DB errors over NotFound
This commit is contained in:
Jinzhu 2017-04-17 10:34:52 +08:00 committed by GitHub
commit 5b509264e1
1 changed files with 1 additions and 3 deletions

View File

@ -80,9 +80,7 @@ func queryCallback(scope *Scope) {
if err := rows.Err(); err != nil { if err := rows.Err(); err != nil {
scope.Err(err) scope.Err(err)
} } else if scope.db.RowsAffected == 0 && !isSlice {
if scope.db.RowsAffected == 0 && !isSlice {
scope.Err(ErrRecordNotFound) scope.Err(ErrRecordNotFound)
} }
} }