Skip to content

Commit

Permalink
do not panic on scan failure on update/create
Browse files Browse the repository at this point in the history
  • Loading branch information
galeone committed Apr 14, 2024
1 parent 4afcd70 commit 85be448
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions igor_private.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,7 @@ func (db *Database) commonCreateUpdate(value DBModel, builder func() string) err
}
// Use the new struct with the fields lib/pq compatible for slices
// e.g. pq.Array/pg.StringArray instead of []string and similar
if err = db.Scan(value); err != nil {
panic(err)
}
return nil
return db.Scan(value)
}

// replaceMarks replace question marks (?) with the PostgreSQL variable identifier
Expand Down

0 comments on commit 85be448

Please sign in to comment.