Skip to content

Commit

Permalink
RHINENG-1604: return only necessary columns after system_platform update
Browse files Browse the repository at this point in the history
  • Loading branch information
psegedy committed Sep 12, 2023
1 parent 2c5ee0a commit 642778b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion listener/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,12 @@ func storeOrUpdateSysPlatform(tx *gorm.DB, system *models.SystemPlatform, colsTo
}

// return system_platform record after update
tx = tx.Clauses(clause.Returning{})
tx = tx.Clauses(clause.Returning{
Columns: []clause.Column{
{Name: "id"}, {Name: "inventory_id"}, {Name: "rh_account_id"},
{Name: "unchanged_since"}, {Name: "last_evaluation"},
},
})

if system.ID != 0 {
// update system
Expand Down

0 comments on commit 642778b

Please sign in to comment.