Commit 588e5cef authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fix bug: Retrieval of providers without retriever causes exception

parent 2a28e3c3
...@@ -93,6 +93,7 @@ def load_uncached_entries(dbxrefs): ...@@ -93,6 +93,7 @@ def load_uncached_entries(dbxrefs):
if config.has_provider(key): if config.has_provider(key):
provider = config.get_provider(key) provider = config.get_provider(key)
logger.debug('{0} is supported'.format(key)) logger.debug('{0} is supported'.format(key))
if 'retriever' in provider:
if provider['retriever']['type'] == 'external': if provider['retriever']['type'] == 'external':
results.extend( load_with_external_provider(provider, list(dbxrefs))) results.extend( load_with_external_provider(provider, list(dbxrefs)))
elif provider['retriever']['type'] == 'internal': elif provider['retriever']['type'] == 'internal':
...@@ -102,4 +103,7 @@ def load_uncached_entries(dbxrefs): ...@@ -102,4 +103,7 @@ def load_uncached_entries(dbxrefs):
else: else:
logger.debug('{0} is not supported'.format(key)) logger.debug('{0} is not supported'.format(key))
results.extend( map(lambda x: {'id': toString(x), 'status': 'not supported'}, dbxrefs)) results.extend( map(lambda x: {'id': toString(x), 'status': 'not supported'}, dbxrefs))
else:
logger.debug('{0} is not supported'.format(key))
results.extend( map(lambda x: {'id': toString(x), 'status': 'not supported'}, dbxrefs))
return (results) return (results)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment