aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authorisation/resources
diff options
context:
space:
mode:
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()