Skip to content

Commit

Permalink
Merge pull request #1407 from microbiomedata/1406-fix-study-page-prot…
Browse files Browse the repository at this point in the history
…ocols

Use correct slot for study protocols for Berkeley schema
  • Loading branch information
naglepuff authored Oct 7, 2024
2 parents 1973868 + 50bd664 commit 769707f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nmdc_server/ingest/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def load(db: Session, cursor: Cursor):
doi_provider=doi.get("doi_provider", ""),
)

protocol_links = obj.pop("protocol_link", None)
if protocol_links:
obj["relevant_protocols"] = [p["url"] for p in protocol_links if "url" in p]

new_study = create_study(db, Study(**obj))
if dois:
for doi in dois:
Expand Down

0 comments on commit 769707f

Please sign in to comment.