Skip to content

Commit

Permalink
Merge pull request go-gorm#1438 from tux-mind/master
Browse files Browse the repository at this point in the history
DB errors over NotFound
  • Loading branch information
jinzhu authored Apr 17, 2017
2 parents 45ccb13 + 1eb3a5a commit 5b50926
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions callback_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ func queryCallback(scope *Scope) {

if err := rows.Err(); err != nil {
scope.Err(err)
}

if scope.db.RowsAffected == 0 && !isSlice {
} else if scope.db.RowsAffected == 0 && !isSlice {
scope.Err(ErrRecordNotFound)
}
}
Expand Down

0 comments on commit 5b50926

Please sign in to comment.