Fix an issue where an unlicensed system would throw errors

In the case where the license was entirely not present but the tower
license module was present
This commit is contained in:
Matthew Jones
2017-07-14 10:20:53 -04:00
parent f5bbccf0cd
commit 891f26c850
4 changed files with 4 additions and 4 deletions

View File

@@ -279,7 +279,7 @@ class ApiV1ConfigView(APIView):
license_info=license_data,
version=get_awx_version(),
ansible_version=get_ansible_version(),
eula=render_to_string("eula.md") if license_data['license_type'] != 'open' else '',
eula=render_to_string("eula.md") if license_data.get('license_type', 'UNLICENSED') != 'open' else '',
analytics_status=pendo_state
)