From 5e8a7eeb8afab3132e8740516dd560d92ad75548 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Tue, 18 Oct 2016 00:22:15 -0400 Subject: [PATCH] Return empty dict if no license present (or invalid key). --- awx/api/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/api/views.py b/awx/api/views.py index 1343b34d3b..b5e6c5a45a 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -191,6 +191,8 @@ class ApiV1ConfigView(APIView): license_data = get_license(show_key=True) else: license_data = get_license(show_key=False) + if not license_data.get('valid_key', False): + license_data = {} if license_data and 'features' in license_data and 'activity_streams' in license_data['features']: # FIXME: Make the final setting value dependent on the feature? license_data['features']['activity_streams'] &= settings.ACTIVITY_STREAM_ENABLED