about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-06-09 14:18:01 -0500
committerFrederick Muriuki Muriithi2025-06-09 14:18:01 -0500
commit17c53d7544e87b5bc295d43bded376179304ca32 (patch)
tree0efa052ff54c584f6839cca8b140807fd1dfff40 /scripts
parentbffce9763f044f806bd396d799304f1ca2acf655 (diff)
downloadgn-uploader-17c53d7544e87b5bc295d43bded376179304ca32.tar.gz
Fix bug in data for creating a new resource.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/load_phenotypes_to_db.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py
index 2b024c1..a76bee1 100644
--- a/scripts/load_phenotypes_to_db.py
+++ b/scripts/load_phenotypes_to_db.py
@@ -300,12 +300,12 @@ def update_auth(authserver, token, species, population, dataset, xrefdata):
         return mrequests.post(
             authserveruri("/auth/resource/create"),
             headers=headers,
-            data={
+            json={
                 "resource_category": category["resource_category_id"],
-                "resource_name": (f"{user['email']}—{dataset['name']}—{now}—"
+                "resource_name": (f"{user['email']}—{dataset['Name']}—{now}—"
                                   f"{len(xrefdata)} phenotypes"),
                 "public": "off"
-            }).then(lambda cr_results: (user, linkeddata, resource))
+            }).then(lambda cr_results: (user, linkeddata, cr_results))
 
     def __attach_data_to_resource__(user, linkeddata, resource):
         logger.debug("… attaching data to authorisation resource object")