forked from mirror/gorm
fix return value and delete unused default (#3280)
This commit is contained in:
parent
b5de8aeb42
commit
3411425d65
|
@ -69,7 +69,7 @@ func (db *DB) Distinct(args ...interface{}) (tx *DB) {
|
||||||
if len(args) > 0 {
|
if len(args) > 0 {
|
||||||
tx = tx.Select(args[0], args[1:]...)
|
tx = tx.Select(args[0], args[1:]...)
|
||||||
}
|
}
|
||||||
return tx
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select specify fields that you want when querying, creating, updating
|
// Select specify fields that you want when querying, creating, updating
|
||||||
|
|
|
@ -148,7 +148,6 @@ func (tx *DB) assignInterfacesToValue(values ...interface{}) {
|
||||||
if field := tx.Statement.Schema.LookUpField(column.Name); field != nil {
|
if field := tx.Statement.Schema.LookUpField(column.Name); field != nil {
|
||||||
tx.AddError(field.Set(tx.Statement.ReflectValue, eq.Value))
|
tx.AddError(field.Set(tx.Statement.ReflectValue, eq.Value))
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue