From 89a39f4bed3c436657276a756535d725e068e6e9 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Tue, 25 Jul 2017 14:33:07 -0400 Subject: [PATCH] add scm to cloud sources so computed fields works --- awx/main/models/base.py | 2 +- awx/main/models/inventory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/main/models/base.py b/awx/main/models/base.py index ea70070770..99572fa91d 100644 --- a/awx/main/models/base.py +++ b/awx/main/models/base.py @@ -52,7 +52,7 @@ PROJECT_UPDATE_JOB_TYPE_CHOICES = [ (PERM_INVENTORY_CHECK, _('Check')), ] -CLOUD_INVENTORY_SOURCES = ['ec2', 'rax', 'vmware', 'gce', 'azure', 'azure_rm', 'openstack', 'custom', 'satellite6', 'cloudforms'] +CLOUD_INVENTORY_SOURCES = ['ec2', 'rax', 'vmware', 'gce', 'azure', 'azure_rm', 'openstack', 'custom', 'satellite6', 'cloudforms', 'scm',] VERBOSITY_CHOICES = [ (0, '0 (Normal)'), diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 17809b51ab..8cf291a86d 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -334,7 +334,7 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin): failed_hosts = active_hosts.filter(has_active_failures=True) active_groups = self.groups failed_groups = active_groups.filter(has_active_failures=True) - active_inventory_sources = self.inventory_sources.filter( source__in=CLOUD_INVENTORY_SOURCES) + active_inventory_sources = self.inventory_sources.filter(source__in=CLOUD_INVENTORY_SOURCES) failed_inventory_sources = active_inventory_sources.filter(last_job_failed=True) computed_fields = { 'has_active_failures': bool(failed_hosts.count()),