Skip to content

Commit

Permalink
fix: linters issues + simplify line 127 db/db.go
Browse files Browse the repository at this point in the history
Co-authored-by: Raphaël Pinson <github+aem1eeshi1@raphink.net>
  • Loading branch information
hbollon and raphink committed Jun 18, 2021
1 parent d2e151d commit 2bc5f7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion db/db.go
Expand Up @@ -124,7 +124,8 @@ func (db *Database) stateS3toDB(sf *statefile.File, path string, versionID strin
// Check if the associated lineage is already present in lineages table
// If so, it recovers its ID otherwise it inserts it at the same time as the state
var lineage types.Lineage
if errors.Is(db.First(&lineage, types.Lineage{Value: sf.Lineage}).Error, gorm.ErrRecordNotFound) {
err := db.First(&lineage, types.Lineage{Value: sf.Lineage}).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
st = types.State{
Path: path,
Version: version,
Expand Down

0 comments on commit 2bc5f7b

Please sign in to comment.