CORD-2107 Fix bug with instances connected to wrong networks

Change-Id: Id48e7ba82cc14cf40fe2231f484c12384cde1ed1
(cherry picked from commit 4bfbf3ab0dba598525eb620a90c0992be00ddab8)
diff --git a/xos/synchronizer/steps/sync_instances.py b/xos/synchronizer/steps/sync_instances.py
index e35da51..d98343d 100644
--- a/xos/synchronizer/steps/sync_instances.py
+++ b/xos/synchronizer/steps/sync_instances.py
@@ -154,7 +154,7 @@
         networks_ids = [x.id for x in networks]
         controller_networks = ControllerNetwork.objects.filter(
             controller_id=instance.node.site_deployment.controller.id)
-        controller_networks = [x for x in controller_networks if x.id in networks_ids]
+        controller_networks = [x for x in controller_networks if x.network_id in networks_ids]
 
         for network in networks:
             if not ControllerNetwork.objects.filter(network_id=network.id,