aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorPjotr Prins2016-06-24 06:51:28 +0000
committerPjotr Prins2016-06-24 06:51:28 +0000
commit764136ff18bd355f7b9dbe91f870919b0a17322e (patch)
tree2636b5c0d68d38e391476b4723a6f005d536b5c8 /wqflask/base
parent923e94c39f5768f836dbf5fc29b0186c13ccc86b (diff)
downloadgenenetwork2-764136ff18bd355f7b9dbe91f870919b0a17322e.tar.gz
Log: and document SQL calls
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/data_set.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index ffc5917a..c70738f7 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -711,12 +711,14 @@ class PhenotypeDataSet(DataSet):
this_trait.LRS_location_value = 1000000
if this_trait.lrs:
- result = g.db.execute("""
+ query = """
select Geno.Chr, Geno.Mb from Geno, Species
where Species.Name = %s and
Geno.Name = %s and
Geno.SpeciesId = Species.Id
- """, (species, this_trait.locus)).fetchone()
+ """ % (species, this_trait.locus)
+ logger.sql(query)
+ result = g.db.execute(query).fetchone()
if result:
if result[0] and result[1]:
@@ -1172,9 +1174,9 @@ def geno_mrna_confidentiality(ob):
#logger.debug("dataset_table [%s]: %s" % (type(dataset_table), dataset_table))
query = '''SELECT Id, Name, FullName, confidentiality,
- AuthorisedUsers FROM %s WHERE Name = %%s''' % (dataset_table)
+ AuthorisedUsers FROM %s WHERE Name = "%s"''' % (dataset_table,ob.name)
logger.sql(query)
- result = g.db.execute(query, ob.name)
+ result = g.db.execute(query)
(dataset_id,
name,