From 85e9e69e265d12235acdf8992e1c4611961d65b0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 21 Apr 2023 04:39:29 +0300 Subject: oauth2: Update to enable linking of phenotypes. --- wqflask/wqflask/oauth2/resources.py | 4 ++-- wqflask/wqflask/templates/oauth2/group_join_or_create.html | 1 + wqflask/wqflask/templates/oauth2/view-resource.html | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/oauth2/resources.py b/wqflask/wqflask/oauth2/resources.py index c4f3744b..c01889c3 100644 --- a/wqflask/wqflask/oauth2/resources.py +++ b/wqflask/wqflask/oauth2/resources.py @@ -126,7 +126,7 @@ def link_data_to_resource(): form = request.form try: assert "resource_id" in form, "Resource ID not provided." - assert "dataset_id" in form, "Dataset ID not provided." + assert "data_link_id" in form, "Data Link ID not provided." assert "dataset_type" in form, "Dataset type not specified" assert form["dataset_type"].lower() in ( "mrna", "genotype", "phenotype"), "Invalid dataset type provided." @@ -157,7 +157,7 @@ def unlink_data_from_resource(): form = request.form try: assert "resource_id" in form, "Resource ID not provided." - assert "dataset_id" in form, "Dataset ID not provided." + assert "data_link_id" in form, "Data Link ID not provided." resource_id = form["resource_id"] def __error__(error): diff --git a/wqflask/wqflask/templates/oauth2/group_join_or_create.html b/wqflask/wqflask/templates/oauth2/group_join_or_create.html index 6f74d576..0209cd15 100644 --- a/wqflask/wqflask/templates/oauth2/group_join_or_create.html +++ b/wqflask/wqflask/templates/oauth2/group_join_or_create.html @@ -1,4 +1,5 @@ {%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} {%block title%}Join or Create Group{%endblock%} {%block css%} diff --git a/wqflask/wqflask/templates/oauth2/view-resource.html b/wqflask/wqflask/templates/oauth2/view-resource.html index 510d7e67..8a5b360c 100644 --- a/wqflask/wqflask/templates/oauth2/view-resource.html +++ b/wqflask/wqflask/templates/oauth2/view-resource.html @@ -126,8 +126,8 @@ method="POST"> - + @@ -199,10 +199,10 @@ action="{{url_for('oauth2.resource.link_data_to_resource')}}"> - + + value="{{resource.resource_category.resource_category_key | lower}}" />