aboutsummaryrefslogtreecommitdiff
path: root/gn3/db/traits.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-08-05 21:35:02 +0300
committerBonfaceKilz2021-08-05 21:35:02 +0300
commit64e567caaca9c56d2d5f2a1bafe01860927e2c0c (patch)
tree7cb2e4cdfb64ed60067a081ba1b4e040c6e80a78 /gn3/db/traits.py
parent487e50e8f8304a65e7af3759c13256f921efb8be (diff)
downloadgenenetwork3-64e567caaca9c56d2d5f2a1bafe01860927e2c0c.tar.gz
db: traits: Return unique values when fetching sample data
Diffstat (limited to 'gn3/db/traits.py')
-rw-r--r--gn3/db/traits.py2
1 files changed, 1 insertions, 1 deletions
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) "