Don't return error on successful insert
This commit is contained in:
parent
c48607477e
commit
b7221cb364
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ func ({{ $short }} *{{ .Name }}) Insert(db XODB) error {
|
||||||
|
|
||||||
// run query
|
// run query
|
||||||
XOLog(sqlstr, {{ fieldnames .Fields $short }})
|
XOLog(sqlstr, {{ fieldnames .Fields $short }})
|
||||||
err = db.QueryRow(sqlstr, {{ fieldnames .Fields $short }}).Scan(&{{ $short }}.{{ .PrimaryKey.Name }})
|
_, err = db.Exec(sqlstr, {{ fieldnames .Fields $short }})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue