diff options
author | Zachary Sloan | 2013-06-21 20:58:12 +0000 |
---|---|---|
committer | Zachary Sloan | 2013-06-21 20:58:12 +0000 |
commit | a0a1d8b70e02871328fb044c7ae190f805b0a04e (patch) | |
tree | 6ee2a78128e8e940d0324e57ea2ba3b3f3609f75 /wqflask | |
parent | 1b227abd09eabc9ff60e4b9cb393d66ed90f2cf5 (diff) | |
download | genenetwork2-a0a1d8b70e02871328fb044c7ae190f805b0a04e.tar.gz |
Fixed bug where cursor was still being used in query
Diffstat (limited to 'wqflask')
-rwxr-xr-x | wqflask/base/data_set.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 07fe9cd9..1668940c 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -779,14 +779,14 @@ class MrnaAssayDataSet(DataSet): #Max LRS and its Locus location if this_trait.lrs and this_trait.locus: - self.cursor.execute(""" + query = """ select Geno.Chr, Geno.Mb from Geno, Species - where Species.Name = '%s' and - Geno.Name = '%s' and + where Species.Name = '{}' and + Geno.Name = '{}' and Geno.SpeciesId = Species.Id - """ % (species, this_trait.locus)) - result = self.cursor.fetchone() - + """.format(species, this_trait.locus) + result = g.db.execute(query).fetchone() + if result: #if result[0] and result[1]: # lrs_chr = result[0] |