aboutsummaryrefslogtreecommitdiff
path: root/wqflask/dbFunction
diff options
context:
space:
mode:
authorPjotr Prins2016-06-21 08:59:26 +0000
committerPjotr Prins2016-06-21 08:59:26 +0000
commitaa638a88e843657bb80f1db1e726b6135cefd11f (patch)
treede3e838a3ea33a646823a96726edc1bb4bac66fb /wqflask/dbFunction
parent2bae8718f4d4ec185586d12ae007f79a8dd89136 (diff)
downloadgenenetwork2-aa638a88e843657bb80f1db1e726b6135cefd11f.tar.gz
Logger: SQL
Diffstat (limited to 'wqflask/dbFunction')
-rw-r--r--wqflask/dbFunction/webqtlDatabaseFunction.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/dbFunction/webqtlDatabaseFunction.py b/wqflask/dbFunction/webqtlDatabaseFunction.py
index d7e160d0..4a0fb40f 100644
--- a/wqflask/dbFunction/webqtlDatabaseFunction.py
+++ b/wqflask/dbFunction/webqtlDatabaseFunction.py
@@ -47,7 +47,7 @@ def getCursor():
except:
return None
-def fetchone(callername,query):
+def fetchone(query):
"""Return tuple containing one row by calling SQL directly
"""
@@ -55,6 +55,7 @@ def fetchone(callername,query):
def helper(query):
res = g.db.execute(query)
return res.fetchone()
+ callername = stack()[1][3]
return logger.sql(callername, query, helper)
def gn_server(path):
@@ -73,10 +74,10 @@ def retrieve_species(group):
"""
if USE_GN_SERVER:
- result = gn_server("/cross/"+group)
+ result = gn_server("/cross/"+group+".json")
return result["species"]
else:
- result = fetchone(stack()[0][3],"select Species.Name from Species, InbredSet where InbredSet.Name = '%s' and InbredSet.SpeciesId = Species.Id" % (group))
+ result = fetchone("select Species.Name from Species, InbredSet where InbredSet.Name = '%s' and InbredSet.SpeciesId = Species.Id" % (group))
return result[0]
###########################################################################