aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authorisation/resources
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-04-21 02:44:29 +0300
committerFrederick Muriuki Muriithi2023-04-21 02:44:29 +0300
commit1fb5633042aa730d9467ad086196df99e60de151 (patch)
tree27a6cd32bae004c3709b2def1fd847d8c4e9ed4e /gn3/auth/authorisation/resources
parent735adc012cc5d974eb8eabb26eda6c483af0da1a (diff)
downloadgenenetwork3-1fb5633042aa730d9467ad086196df99e60de151.tar.gz
auth: Fetch user group phenotypes not attached to a resource.
Diffstat (limited to 'gn3/auth/authorisation/resources')
-rw-r--r--gn3/auth/authorisation/resources/models.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gn3/auth/authorisation/resources/models.py b/gn3/auth/authorisation/resources/models.py
index 4c71ade..2e2ff53 100644
--- a/gn3/auth/authorisation/resources/models.py
+++ b/gn3/auth/authorisation/resources/models.py
@@ -240,8 +240,7 @@ def phenotype_resource_data(
cursor.execute(
"SELECT * FROM phenotype_resources AS pr "
"INNER JOIN linked_phenotype_data AS lpd "
- "ON (pr.trait_id=lpd.dataset_or_trait_id "
- "AND pr.dataset_type=lpd.dataset_type) "
+ "ON pr.data_link_id=lpd.data_link_id "
"WHERE pr.resource_id=?",
(str(resource_id),))
return cursor.fetchall()