@@ -139,14 +139,14 @@ BEGIN
139139 os_name = ih .system_profile - > ' operating_system' - >> ' name' ,
140140 os_major = safe_to_int(ih .system_profile - > ' operating_system' - >> ' major' ),
141141 os_minor = safe_to_int(ih .system_profile - > ' operating_system' - >> ' minor' ),
142- rhsm_version = ih .system_profile - > ' rhsm' - >> ' version' ,
142+ rhsm_version = NULLIF( ih .system_profile - > ' rhsm' - >> ' version' , ' ' ) ,
143143 subscription_manager_id = safe_to_uuid(ih .system_profile - >> ' owner_id' ),
144144 sap_workload = COALESCE((ih .system_profile - > ' workloads' - > ' sap' - >> ' sap_system' )::BOOLEAN , false),
145145 sap_workload_sids = ARRAY(SELECT jsonb_array_elements_text(ih .system_profile - > ' workloads' - > ' sap' - > ' sids' )),
146146 ansible_workload = COALESCE(LENGTH(ih .system_profile - > ' workloads' - >> ' ansible' ) > 2 , false),
147- ansible_workload_controller_version = ih .system_profile - > ' workloads' - > ' ansible' - >> ' controller_version' ,
147+ ansible_workload_controller_version = NULLIF( ih .system_profile - > ' workloads' - > ' ansible' - >> ' controller_version' , ' ' ) ,
148148 mssql_workload = COALESCE(LENGTH(ih .system_profile - > ' workloads' - >> ' mssql' ) > 2 , false),
149- mssql_workload_version = ih .system_profile - > ' workloads' - > ' mssql' - >> ' version'
149+ mssql_workload_version = NULLIF( ih .system_profile - > ' workloads' - > ' mssql' - >> ' version' , ' ' )
150150 FROM inventory .hosts ih
151151 WHERE ih .id = si .inventory_id ;
152152 END IF;
0 commit comments