Skip to content
Snippets Groups Projects
Verified Commit fcf86bc0 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Handle platforms without UUIDs

parent 09946dbe
No related branches found
No related tags found
No related merge requests found
Pipeline #111727 passed
......@@ -7,7 +7,8 @@ module ForemanUuidBoot
def self.populate_fields_from_facts(host, parser, _type, _proxy)
facet = host.uuidboot_facet || host.build_uuidboot_facet
facet.uuid = parser.facts.dig('dmi', 'product', 'uuid') || parser.facts['uuid']
facet.save if facet.changed?
facet.save if facet.uuid && facet.changed?
facet.destroy if !facet.uuid && facet.persisted?
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment