Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
7f76fb22
Commit
7f76fb22
authored
Apr 16, 2021
by
Kenzo-Hugo Hillion
♻
Browse files
keep original data when getting detailed info for source
parent
a2daa682
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/metagenedb/api/catalog/views/source.py
View file @
7f76fb22
...
...
@@ -28,12 +28,11 @@ class SourceViewSet(BulkViewSet):
def
_get_external_info
(
self
,
db_data
):
detailed_info_retriever
=
GetDOIExternalInfo
(
db_data
[
'doi'
])
try
:
d
etailed_data
=
detailed_info_retriever
.
get_details
()
d
b_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"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment