Commit 7f76fb22 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

keep original data when getting detailed info for source

parent a2daa682
......@@ -28,12 +28,11 @@ class SourceViewSet(BulkViewSet):
def _get_external_info(self, db_data):
detailed_info_retriever = GetDOIExternalInfo(db_data['doi'])
try:
detailed_data = detailed_info_retriever.get_details()
db_data['details'] = detailed_info_retriever.get_details()
except NotImplementedError as not_implemented_error:
logger.warning("Could not found API for the source, returning item from the DB. Error: %s" %
not_implemented_error)
detailed_data = db_data
return detailed_data
return db_data
@swagger_auto_schema(
operation_description="Retrieve gene source from a name",
......
Markdown is supported
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