Skip to content

Commit 3dae194

Browse files
authored
Merge pull request #262 from OpenTreeOfLife/fix-duplicate-study-check
Convert duplicate-study results to bare study IDs
2 parents 39f34e0 + 35e98ec commit 3dae194

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • phylesystem_api/phylesystem_api/views

phylesystem_api/phylesystem_api/views/study.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,13 @@ def _fetch_duplicate_study_ids(request, study_DOI=None, study_ID=None):
182182
duplicate_study_ids = oti.find_studies(
183183
{"ot:studyPublication": study_DOI}, verbose=False, exact=True
184184
)
185+
# strip the list to just include bare study IDs
186+
duplicate_study_ids = [x['ot:studyId'] for x in duplicate_study_ids]
185187
try:
186188
duplicate_study_ids.remove(study_ID)
187189
except ValueError:
188190
# ignore error, if oti is lagging and doesn't have this study yet
189191
pass
190-
pass
191192
return duplicate_study_ids
192193

193194

0 commit comments

Comments
 (0)