Skip to content

Commit 2e48130

Browse files
committed
RHINENG-25286: store empty subscription_manager_id as NULL
1 parent c685a55 commit 2e48130

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

base/inventory/inventory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type SystemProfile struct {
2020
Releasever *string `json:"releasever,omitempty"`
2121
SatelliteManaged bool `json:"satellite_managed,omitempty"`
2222
BootcStatus Bootc `json:"bootc_status,omitempty"`
23-
OwnerID uuid.UUID `json:"owner_id,omitempty"`
23+
OwnerID *uuid.UUID `json:"owner_id,omitempty"`
2424
Workloads Workloads `json:"workloads,omitempty"`
2525
}
2626

listener/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ func storeOrUpdateSysPlatform(
453453
OSMajor: &host.SystemProfile.OperatingSystem.Major,
454454
OSMinor: &host.SystemProfile.OperatingSystem.Minor,
455455
RhsmVersion: utils.EmptyToNil(&host.SystemProfile.Rhsm.Version),
456-
SubscriptionManagerID: &host.SystemProfile.OwnerID,
456+
SubscriptionManagerID: host.SystemProfile.OwnerID,
457457
SapWorkload: host.SystemProfile.Workloads.Sap.SapSystem,
458458
SapWorkloadSIDs: pq.StringArray(host.SystemProfile.Workloads.Sap.Sids),
459459
AnsibleWorkload: host.SystemProfile.Workloads.Ansible.ControllerVersion != "",

listener/upload_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func createTestHostWithEnv(reporter, consumer, baseURL string) *Host {
6666
ID: id,
6767
Reporter: reporter,
6868
SystemProfile: inventory.SystemProfile{
69-
OwnerID: consumerUUID,
69+
OwnerID: &consumerUUID,
7070
YumRepos: &[]inventory.YumRepo{{
7171
ID: "base",
7272
Enabled: true,

0 commit comments

Comments
 (0)