Skip to content

Commit

Permalink
RHINENG-1604: remove duplicated insert/update to system_platform
Browse files Browse the repository at this point in the history
  • Loading branch information
psegedy committed Sep 6, 2023
1 parent 8a53667 commit 72bf4a1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions listener/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,6 @@ func updateSystemPlatform(tx *gorm.DB, inventoryID string, accountID int, host *
colsToUpdate = append(colsToUpdate, "yum_updates")
}

if err := database.OnConflictUpdateMulti(tx, []string{"rh_account_id", "inventory_id"}, colsToUpdate...).
Save(&systemPlatform).Error; err != nil {
return nil, errors.Wrap(err, "Unable to save or update system in database")
}

if err := storeOrUpdateSysPlatform(tx, &systemPlatform, colsToUpdate); err != nil {
return nil, errors.Wrap(err, "Unable to save or update system in database")
}
Expand Down

0 comments on commit 72bf4a1

Please sign in to comment.