Skip to content

Commit

Permalink
Convert duplicate-study results to bare study IDs
Browse files Browse the repository at this point in the history
This should restore proper our check for duplicates study IDs,
which was mangled during Pyramid conversion and subsequent refactoring.
  • Loading branch information
jimallman committed Dec 6, 2023
1 parent 39f34e0 commit 35e98ec
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 35e98ec

Please sign in to comment.