This commit is contained in:
Tom Kralidis
2018-04-02 19:44:23 +00:00
parent 14894e4abb
commit 12a296baea
+8 -8
View File
@@ -309,6 +309,14 @@ def get_feature(headers, args, dataset, identifier):
LOGGER.debug('Fetching id {}'.format(identifier))
content = p.get(identifier)
if content is None:
exception = {
'code': 'NotFound',
'description': 'identifier not found'
}
LOGGER.error(exception)
return headers_, 404, json.dumps(exception)
content['links'] = [{
'rel': 'self',
'type': 'application/json',
@@ -320,14 +328,6 @@ def get_feature(headers, args, dataset, identifier):
}
]
if content is None:
exception = {
'code': 'NotFound',
'description': 'identifier not found'
}
LOGGER.error(exception)
return headers_, 404, json.dumps(exception)
return headers_, 200, json.dumps(content)