1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Handle non-existent license data in config view

This commit is contained in:
Akita Noek 2016-05-16 16:34:01 -04:00
parent a2cc2927e6
commit 98412b52f2

View File

@ -202,7 +202,8 @@ class ApiV1ConfigView(APIView):
license_reader = TaskSerializer()
license_data = license_reader.from_database(show_key=request.user.is_superuser)
license_data['features']['activity_streams'] &= tower_settings.ACTIVITY_STREAM_ENABLED
if license_data and 'features' in license_data and 'activity_streams' in license_data['features']:
license_data['features']['activity_streams'] &= tower_settings.ACTIVITY_STREAM_ENABLED
pendo_state = tower_settings.PENDO_TRACKING_STATE if tower_settings.PENDO_TRACKING_STATE in ('off', 'anonymous', 'detailed') else 'off'