@@ -428,11 +428,7 @@ func storeOrUpdateSysPlatform(
428428 },
429429 })
430430
431- workspaces , err := json .Marshal (host .Groups )
432- if err != nil {
433- return errors .Wrap (err , "marshalling groups" )
434- }
435-
431+ hostWorkspaces := inventory .Groups (host .Groups )
436432 inventoryRecord := models.SystemInventory {
437433 ID : system .ID ,
438434 InventoryID : system .InventoryID ,
@@ -449,7 +445,7 @@ func storeOrUpdateSysPlatform(
449445 Arch : system .Arch ,
450446 Bootc : system .Bootc ,
451447 Tags : utils .MarshalNilToJSONB (host .Tags ),
452- Workspaces : utils . MarshalNilToJSONB ( workspaces ) ,
448+ Workspaces : & hostWorkspaces ,
453449 StaleTimestamp : system .StaleTimestamp ,
454450 StaleWarningTimestamp : system .StaleWarningTimestamp ,
455451 CulledTimestamp : system .CulledTimestamp ,
@@ -466,7 +462,7 @@ func storeOrUpdateSysPlatform(
466462 MssqlWorkloadVersion : utils .EmptyToNil (& host .SystemProfile .Workloads .Mssql .Version ),
467463 }
468464
469- err = database .OnConflictUpdateMulti (txi , []string {"rh_account_id" , "inventory_id" }, colsToUpdate ... ).
465+ err : = database .OnConflictUpdateMulti (txi , []string {"rh_account_id" , "inventory_id" }, colsToUpdate ... ).
470466 Create (& inventoryRecord ).Error
471467 if err != nil {
472468 return base .WrapFatalDBError (err , "unable to insert to system_inventory" )
0 commit comments