mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #11546 from jbradberry/remove-instance-activecount
Remove the Instance.objects.active_count() method
This commit is contained in:
commit
6e030fd62f
@ -186,10 +186,6 @@ class InstanceManager(models.Manager):
|
||||
else:
|
||||
return (False, self.me())
|
||||
|
||||
def active_count(self):
|
||||
"""Return count of active Tower nodes for licensing."""
|
||||
return self.exclude(node_type='hop').count()
|
||||
|
||||
|
||||
class InstanceGroupManager(models.Manager):
|
||||
"""A custom manager class for the Instance model.
|
||||
|
||||
@ -77,7 +77,7 @@ def test_instance_dup(org_admin, organization, project, instance_factory, instan
|
||||
ig_all = instance_group_factory("all", instances=[i1, i2, i3])
|
||||
ig_dup = instance_group_factory("duplicates", instances=[i1])
|
||||
project.organization.instance_groups.add(ig_all, ig_dup)
|
||||
actual_num_instances = Instance.objects.active_count()
|
||||
actual_num_instances = Instance.objects.count()
|
||||
list_response = get(reverse('api:instance_list'), user=system_auditor)
|
||||
api_num_instances_auditor = list(list_response.data.items())[0][1]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user