fix: handle error
This commit is contained in:
parent
389a302d38
commit
03d4e7e6ac
@ -181,7 +181,10 @@ func (db *DB) Only(dest interface{}, conds ...interface{}) (tx *DB) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if count > 1 {
|
if count > 1 {
|
||||||
findTx.AddError(ErrMultipleRecordsFound)
|
err := findTx.AddError(ErrMultipleRecordsFound)
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return findTx
|
return findTx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user