Skip to content

Commit

Permalink
Uncapitalize error strings (go-gorm#2533)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneli authored and jinzhu committed Sep 12, 2019
1 parent d5cafb5 commit 13f19a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion callback_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func init() {
// beforeDeleteCallback will invoke `BeforeDelete` method before deleting
func beforeDeleteCallback(scope *Scope) {
if scope.DB().HasBlockGlobalUpdate() && !scope.hasConditions() {
scope.Err(errors.New("Missing WHERE clause while deleting"))
scope.Err(errors.New("missing WHERE clause while deleting"))
return
}
if !scope.HasError() {
Expand Down
2 changes: 1 addition & 1 deletion callback_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func assignUpdatingAttributesCallback(scope *Scope) {
// beforeUpdateCallback will invoke `BeforeSave`, `BeforeUpdate` method before updating
func beforeUpdateCallback(scope *Scope) {
if scope.DB().HasBlockGlobalUpdate() && !scope.hasConditions() {
scope.Err(errors.New("Missing WHERE clause while updating"))
scope.Err(errors.New("missing WHERE clause while updating"))
return
}
if _, ok := scope.Get("gorm:update_column"); !ok {
Expand Down

0 comments on commit 13f19a5

Please sign in to comment.