From a58729b98a51ce4ce2efba35df6ca69b3a83f2f4 Mon Sep 17 00:00:00 2001 From: Patrik Segedy Date: Mon, 25 Mar 2024 18:59:56 +0100 Subject: [PATCH] RHINENG-9028: fix impossible condition - wrong err checked --- listener/upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/listener/upload.go b/listener/upload.go index 4a942d5d8..5e1b13ac4 100644 --- a/listener/upload.go +++ b/listener/upload.go @@ -387,7 +387,7 @@ func updateSystemPlatform(tx *gorm.DB, inventoryID string, accountID int, host * func storeOrUpdateSysPlatform(tx *gorm.DB, system *models.SystemPlatform, colsToUpdate []string) error { var err error if errSelect := tx.Where("rh_account_id = ? AND inventory_id = ?", system.RhAccountID, system.InventoryID). - Select("id").Find(system).Error; err != nil { + Select("id").Find(system).Error; errSelect != nil { utils.LogWarn("err", errSelect, "couldn't find system for update") }