fix rack comparison while updating location (#82)

This commit is contained in:
Solvik 2019-09-12 12:03:13 +02:00 committed by GitHub
parent 5f851ec619
commit e9ec69bc3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ class ServerBase():
update = True
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(
server.rack,
nb_rack,