From 0cbf07162e4669f43301f3b35b6f062a00d2ad29 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 9 Jun 2025 14:38:29 -0500 Subject: Compute the data_link_ids from the request results. --- scripts/load_phenotypes_to_db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py index a76bee1..223a435 100644 --- a/scripts/load_phenotypes_to_db.py +++ b/scripts/load_phenotypes_to_db.py @@ -312,10 +312,11 @@ def update_auth(authserver, token, species, population, dataset, xrefdata): return mrequests.post( authserveruri("/auth/resource/data/link"), headers=headers, - data={ + json={ "dataset_type": "phenotype", "resource_id": resource["resource_id"], - "data_link_ids": [item["data_link_id"] for item in linkeddata] + "data_link_ids": [ + item["data_link_id"] for item in linkeddata["traits"]] }).then(lambda attc: (user, linkeddata, resource, attc)) raise NotImplementedError("Please implement this!") -- cgit v1.2.3