aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2016-06-23 06:27:32 +0000
committerPjotr Prins2016-06-23 06:27:32 +0000
commitb00cd99942cb33a6ca8c16d9bd3ecf4d053fcc52 (patch)
tree56d57feebba331f5b873ecc672f61704c5075efb
parentaa873c386aee39ad2d3da1ce1598a2214b05b27b (diff)
downloadgenenetwork2-b00cd99942cb33a6ca8c16d9bd3ecf4d053fcc52.tar.gz
Added REST call for species_id
-rw-r--r--wqflask/db/webqtlDatabaseFunction.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/db/webqtlDatabaseFunction.py b/wqflask/db/webqtlDatabaseFunction.py
index 567e7375..d6aabc41 100644
--- a/wqflask/db/webqtlDatabaseFunction.py
+++ b/wqflask/db/webqtlDatabaseFunction.py
@@ -58,4 +58,7 @@ def retrieve_species(group):
def retrieve_species_id(group):
- return g.db.execute("select SpeciesId from InbredSet where Name = %s", (group)).fetchone()[0]
+
+ result = fetch1("select SpeciesId from InbredSet where Name = '%s'" % (group),"/cross/"+group+".json",lambda r: r["species_id"])[0]
+ logger.debug("retrieve_species_id result:",result)
+ return result