From 71fc2320d0459b9e19dcf2dde29efbcd55b2866c Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Tue, 19 May 2015 16:17:54 -0400 Subject: [PATCH] System tracking is off if there is no license. --- awx/api/management/commands/uses_mongo.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/api/management/commands/uses_mongo.py b/awx/api/management/commands/uses_mongo.py index 7b9bda26a6..430e354f3c 100644 --- a/awx/api/management/commands/uses_mongo.py +++ b/awx/api/management/commands/uses_mongo.py @@ -20,6 +20,11 @@ class Command(BaseCommand): license_reader = TaskSerializer() license_data = license_reader.from_file() + # Does the license have features, at all? + # If there is no license yet, then all features are clearly off. + if 'features' not in license_data: + return False + # Does the license contain the system tracking feature? # If and only if it does, MongoDB should run. system_tracking = license_data['features']['system_tracking']