DB errors over NotFound

Errors comings from DB have higher priority than logic ones
This commit is contained in:
tux-mind 2017-04-16 21:15:51 +02:00 committed by GitHub
parent 45ccb13437
commit 1eb3a5ae97
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)
} }
} }