fix: always get_device_platform

Signed-off-by: Cyril Levis <git@levis.name>
This commit is contained in:
Cyril Levis 2022-03-31 19:54:34 +02:00
parent cf2cc54da4
commit 9e797c376e
No known key found for this signature in database
GPG key ID: 6DB88737C11F5A48

View file

@ -465,11 +465,10 @@ class ServerBase():
ret, server = self.update_netbox_location(server)
update += ret
if config.device.platform is not None:
platform = get_device_platform(config)
if server.platform != platform.name:
update += 1
server.platform = platform.id
platform = get_device_platform(config)
if server.platform != platform.name:
server.platform = platform.id
update += 1
if update:
server.save()