about summary refs log tree commit diff
path: root/wqflask/base/data_set.py
diff options
context:
space:
mode:
authorZachary Sloan2012-12-05 14:33:02 -0600
committerZachary Sloan2012-12-05 14:33:02 -0600
commit292d177f768e8f949bc50f8896b560879aaae178 (patch)
tree546e21945f899a8fd20df3d7e5377b866c744148 /wqflask/base/data_set.py
parent01785471d63de156fa9787a0fb38c9df09824183 (diff)
downloadgenenetwork2-292d177f768e8f949bc50f8896b560879aaae178.tar.gz
Continued to make changes related to getting rid of cursor/db_conn
and using simple sqlalchemy

Got Pheno/MrnaAssay dataset searches working again
Diffstat (limited to 'wqflask/base/data_set.py')
-rwxr-xr-xwqflask/base/data_set.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 7833f5c1..70b33014 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -272,7 +272,7 @@ class GenotypeDataSet(DataSet):
                 WHERE
                         GenoFreeze.InbredSetId = InbredSet.Id AND
                         GenoFreeze.Name = "%s"
-                ''' % self.db_conn.escape_string(self.name)
+                ''' % escape(self.name)
 
     def check_confidentiality(self):
         return geno_mrna_confidentiality(self)
@@ -425,13 +425,12 @@ class MrnaAssayDataSet(DataSet):
     where ProbeSetXRef.ProbeSetFreezeId = %s and
     ProbeSet.Id = ProbeSetXRef.ProbeSetId and
     ProbeSet.Name = '%s'
-            """ % (self.db_conn.escape_string(str(this_trait.dataset.id)),
-                   self.db_conn.escape_string(this_trait.name)))
+            """ % (escape(str(this_trait.dataset.id)),
+                   escape(this_trait.name)))
 
             print("query is:", pf(query))
 
-            self.cursor.execute(query)
-            result = self.cursor.fetchone()
+            result = g.db.execute(query).fetchone()
 
             if result:
                 if result[0]: