Log error when URLer service is used but not configured.

This commit is contained in:
Sybren A. Stüvel 2016-10-13 10:01:11 +02:00
parent 96c9e12f7f
commit 10ecb2158e

View File

@ -609,6 +609,10 @@ def project_url(project_id, project):
if project is not None:
return project
if not current_app.config['URLER_SERVICE_AUTH_TOKEN']:
log.error('No URLER_SERVICE_AUTH_TOKEN token, unable to use URLer service.')
return None
urler_api = system_util.pillar_api(
token=current_app.config['URLER_SERVICE_AUTH_TOKEN'])
return Project.find_from_endpoint(