From ee200d60bd3065c4c9e69bcbb756715211b711d2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 26 Nov 2021 11:50:33 +0300 Subject: Return only values Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Return the values from the database, not the tuples. --- gn3/db/correlations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn3/db') diff --git a/gn3/db/correlations.py b/gn3/db/correlations.py index 898de75..05c0809 100644 --- a/gn3/db/correlations.py +++ b/gn3/db/correlations.py @@ -399,12 +399,12 @@ def fetch_sample_ids( "AND Species.name=%(species_name)s") with conn.cursor() as cursor: cursor.execute( - return cursor.fetchall() query, { "samples_names": tuple(sample_names), "species_name": species_name }) + return tuple(row[0] for row in cursor.fetchall()) def build_query_sgo_lit_corr( db_type: str, temp_table: str, sample_id_columns: str, -- cgit v1.2.3