Don't return error on successful insert

This commit is contained in:
paul 2019-07-29 15:05:16 +02:00
parent c48607477e
commit b7221cb364

View file

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