Skip to content

Commit fcfb767

Browse files
authored
RHINENG-12954 retrieve operating_system using get method (#479)
1 parent d97ea61 commit fcfb767

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ros/processor/inventory_events_consumer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def process_system_details(self, msg):
156156
"fqdn": host['fqdn'],
157157
"cloud_provider": host['system_profile']['cloud_provider'],
158158
"stale_timestamp": host['stale_timestamp'],
159-
"operating_system": host['system_profile']['operating_system'],
159+
"operating_system": host['system_profile'].get('operating_system'),
160160
"groups": host.get('groups', [])
161161
}
162162
system = update_system_record(db.session, **system_fields)
@@ -188,7 +188,7 @@ def process_system_details(self, msg):
188188
"fqdn": host['fqdn'],
189189
"cloud_provider": host['system_profile']['cloud_provider'],
190190
"stale_timestamp": host['stale_timestamp'],
191-
"operating_system": host['system_profile']['operating_system'],
191+
"operating_system": host['system_profile'].get('operating_system'),
192192
"groups": host.get('groups', [])
193193
}
194194
system = get_or_create(db.session, System, 'inventory_id', **system_fields)

0 commit comments

Comments
 (0)