From 64e567caaca9c56d2d5f2a1bafe01860927e2c0c Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 5 Aug 2021 21:35:02 +0300 Subject: db: traits: Return unique values when fetching sample data --- gn3/db/traits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn3') diff --git a/gn3/db/traits.py b/gn3/db/traits.py index ae1939a..61bc94d 100644 --- a/gn3/db/traits.py +++ b/gn3/db/traits.py @@ -5,7 +5,7 @@ from typing import Any, Dict, Union def get_trait_csv_sample_data(conn: Any, trait_name: int, phenotype_id: int): """Fetch a trait and return it as a csv string""" - sql = ("SELECT Strain.Id, PublishData.Id, Strain.Name, " + sql = ("SELECT DISTINCT Strain.Id, PublishData.Id, Strain.Name, " "PublishData.value, " "PublishSE.error, NStrain.count FROM " "(PublishData, Strain, PublishXRef, PublishFreeze) " -- cgit v1.2.3