Skip to content

Commit

Permalink
Merge pull request #262 from OpenTreeOfLife/fix-duplicate-study-check
Browse files Browse the repository at this point in the history
Convert duplicate-study results to bare study IDs
  • Loading branch information
mtholder authored Dec 6, 2023
2 parents 39f34e0 + 35e98ec commit 3dae194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion phylesystem_api/phylesystem_api/views/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,13 @@ def _fetch_duplicate_study_ids(request, study_DOI=None, study_ID=None):
duplicate_study_ids = oti.find_studies(
{"ot:studyPublication": study_DOI}, verbose=False, exact=True
)
# strip the list to just include bare study IDs
duplicate_study_ids = [x['ot:studyId'] for x in duplicate_study_ids]
try:
duplicate_study_ids.remove(study_ID)
except ValueError:
# ignore error, if oti is lagging and doesn't have this study yet
pass
pass
return duplicate_study_ids


Expand Down

0 comments on commit 3dae194

Please sign in to comment.