From 88fbb6706f334e9c5a1f0e237f242428add7ea7d Mon Sep 17 00:00:00 2001 From: chris meyers Date: Tue, 3 Apr 2018 14:31:37 -0400 Subject: [PATCH] use non-deprecated way of setting many2many --- awx/main/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 21a09c7ff2..ff72647352 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -148,7 +148,7 @@ def apply_cluster_membership_policies(self): tower_q = InstanceGroup.objects.filter(name='tower') if tower_q.exists(): tower_inst = tower_q[0] - tower_inst.instances = Instance.objects.all_non_isolated() + tower_inst.instances.set(Instance.objects.all_non_isolated()) instances_hostnames = [i.hostname for i in tower_inst.instances.all()] logger.info(six.text_type("Setting 'tower' group instances to {}").format(instances_hostnames)) tower_inst.save()