fix rack comparison while updating location

This commit is contained in:
Solvik Blum 2019-09-12 11:56:11 +02:00
commit 9776320972
No known key found for this signature in database
GPG key ID: CC12B3DC262B6C47

View file

@ -50,7 +50,7 @@ class ServerBase():
update = True update = True
server.site = nb_dc.id server.site = nb_dc.id
if rack and server.rack != nb_rack: if rack and server.rack.id != nb_rack.id:
logging.info('Rack location has changed from {} to {}, updating'.format( logging.info('Rack location has changed from {} to {}, updating'.format(
server.rack, server.rack,
nb_rack, nb_rack,