Uncapitalize error strings

This commit is contained in:
zaneli 2019-07-01 11:40:04 +09:00
parent 836fb2c19d
commit 37ca2999bb
2 changed files with 2 additions and 2 deletions

View File

@ -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() {

View File

@ -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 {